Explorar o código

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 hai 1 ano
pai
achega
c96dcb4cfc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);
   }