Selaa lähdekoodia

Issue 2259 – Badly encoded SFTP packet when renaming a file using SFTP version 5 and newer

https://winscp.net/tracker/2259

Source commit: 620f63fa2e340200805dd485fd863df808862731
Martin Prikryl 1 vuosi sitten
vanhempi
sitoutus
c96dcb4cfc
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      source/core/SftpFileSystem.cpp

+ 1 - 1
source/core/SftpFileSystem.cpp

@@ -3868,7 +3868,7 @@ void __fastcall TSFTPFileSystem::RenameFile(
     TargetName = LocalCanonify(NewName);
   }
   AddPathString(Packet, TargetName, Encrypted);
-  if (UsePosixRename && (FVersion >= 5))
+  if (!UsePosixRename && (FVersion >= 5))
   {
     Packet.AddCardinal(0);
   }