Browse Source

#IQRV #comment 获取签名文件类型逻辑优化

80374374 1 year ago
parent
commit
8803ce9937
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Module/mod_ResourceWatcher/ResourceWatcherFSM.cpp

+ 3 - 1
Module/mod_ResourceWatcher/ResourceWatcherFSM.cpp

@@ -3880,7 +3880,9 @@ void ResourceWatcherFSM::VerifySignature(const CSimpleStringA& filePath)
             string strFileName = fileName;
             string strFilePath;
 
-            if (strFileName.find(".dll") == string::npos && strFileName.find(".exe") == string::npos)
+            if(strFileName.empty() 
+                || (strFileName.rfind(".dll") != strFileName.length() - 4 
+                    && strFileName.rfind(".exe") != strFileName.length() - 4))
                 continue;
 
             strFilePath = strDirPath;