浏览代码

Bug 1716: When an ancestor directory cannot be read, its child files and subdirectories are incorrectly assumed to be encrypted

https://winscp.net/tracker/1716

Source commit: ef6dc8fa00c597078dac62937abf5633047e2c42
Martin Prikryl 6 年之前
父节点
当前提交
a9bacffb13
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      source/core/Terminal.cpp

+ 6 - 0
source/core/Terminal.cpp

@@ -7847,6 +7847,12 @@ TTerminal::TEncryptedFileNames::const_iterator __fastcall TTerminal::GetEncrypte
       {
         throw;
       }
+
+      if (FEncryptedFileNames.find(Path) == FEncryptedFileNames.end())
+      {
+        FEncryptedFileNames.insert(std::make_pair(Path, Path));
+        LogEvent(2, FORMAT(L"Name of file '%s' assumed not to be encrypted", (Path)));
+      }
     }
 
     FFoldersScannedForEncryptedFiles.insert(FileDir);