Переглянути джерело

Bug fix: When moving files to an unvisited folder in encrypted session, the folder contents is cached as before the move

Source commit: 6c87df3021a57a76815cae7241ebce113b0fcbdb
Martin Prikryl 4 роки тому
батько
коміт
0fa2d78f15
1 змінених файлів з 4 додано та 1 видалено
  1. 4 1
      source/core/Terminal.cpp

+ 4 - 1
source/core/Terminal.cpp

@@ -4621,7 +4621,6 @@ bool __fastcall TTerminal::MoveFiles(TStrings * FileList, const UnicodeString Ta
   TMoveFileParams Params;
   Params.Target = Target;
   Params.FileMask = FileMask;
-  DirectoryModified(Target, true);
   bool Result;
   BeginTransaction();
   try
@@ -4632,6 +4631,10 @@ bool __fastcall TTerminal::MoveFiles(TStrings * FileList, const UnicodeString Ta
   {
     if (Active)
     {
+      // Only after the move, as with encryption, the folders can be read and cached before the move
+      // (when determining if the target exists and is encrypted)
+      DirectoryModified(Target, true);
+
       UnicodeString WithTrailing = UnixIncludeTrailingBackslash(CurrentDirectory);
       bool PossiblyMoved = false;
       // check if we was moving current directory.