浏览代码

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 年之前
父节点
当前提交
c96dcb4cfc
共有 1 个文件被更改,包括 1 次插入1 次删除
  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);
   }