Browse Source

Bug 1782: Deleting temporary local copy of remote file caused errors and invalid attempts to upload the nonexisting file

https://winscp.net/tracker/1782
(cherry picked from commit 33d736a4b684b650b7a47011f1f08bdd0fc82ff4)

Source commit: d6f0f8471f5f7636547a2e3592af7a7f26298172
Martin Prikryl 6 years ago
parent
commit
5eb228300c
1 changed files with 3 additions and 2 deletions
  1. 3 2
      source/windows/EditorManager.cpp

+ 3 - 2
source/windows/EditorManager.cpp

@@ -464,8 +464,9 @@ bool __fastcall TEditorManager::HasFileChanged(int Index, TDateTime & NewTimesta
   }
   else
   {
-    FileAge(FileData->FileName, NewTimestamp);
-    Result = (FileData->Timestamp != NewTimestamp);
+    Result =
+      FileAge(FileData->FileName, NewTimestamp) &&
+      (FileData->Timestamp != NewTimestamp);
   }
   return Result;
 }