[Ttssh2-commit] [7676] pluginフォルダの.dll又は.spiファイルのみを読み込むようにした

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 5月 14日 (火) 00:15:03 JST


Revision: 7676
          https://osdn.net/projects/ttssh2/scm/svn/commits/7676
Author:   zmatsuo
Date:     2019-05-14 00:15:02 +0900 (Tue, 14 May 2019)
Log Message:
-----------
pluginフォルダの.dll又は.spiファイルのみを読み込むようにした

Modified Paths:
--------------
    trunk/teraterm/teraterm/vtdisp.c

-------------- next part --------------
Modified: trunk/teraterm/teraterm/vtdisp.c
===================================================================
--- trunk/teraterm/teraterm/vtdisp.c	2019-05-13 15:14:53 UTC (rev 7675)
+++ trunk/teraterm/teraterm/vtdisp.c	2019-05-13 15:15:02 UTC (rev 7676)
@@ -598,9 +598,19 @@
       BITMAPINFO *pbmi;
       char       *pbuf;
       char spiFileName[MAX_PATH];
+	  const char *ext;
 
       if(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
         continue;
+	  ext = strrchr(fd.cFileName, '.');
+	  if (ext == NULL) {
+		  // \x8Ag\x92\xA3\x8Eq\x82\xAA\x82Ȃ\xA2\x83t\x83@\x83C\x83\x8B?
+		  continue;
+	  }
+	  if (strcmp(ext, ".dll") != 0 && strcmp(ext, ".spi") != 0) {
+		  // .dll or .spi \x88ȊO\x82̃t\x83@\x83C\x83\x8B
+		  continue;
+	  }
 
       strncpy_s(spiFileName, sizeof(spiFileName), spiPath, _TRUNCATE);
       strncat_s(spiFileName, sizeof(spiFileName), fd.cFileName, _TRUNCATE);


Ttssh2-commit メーリングリストの案内
Back to archive index