浏览代码

Bug fix: Error when downloading file to a temporary filename with a long path with SFTP protocol

Source commit: 84cade95834920be5967339c7724c842c51c8683
Martin Prikryl 7 年之前
父节点
当前提交
2bd3acfc7e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      source/core/SftpFileSystem.cpp

+ 1 - 1
source/core/SftpFileSystem.cpp

@@ -5509,7 +5509,7 @@ void __fastcall TSFTPFileSystem::Sink(
         {
           DeleteFileChecked(DestFullName);
         }
-        THROWOSIFFALSE(Sysutils::RenameFile(DestPartialFullName, DestFullName));
+        THROWOSIFFALSE(Sysutils::RenameFile(ApiPath(DestPartialFullName), ApiPath(DestFullName)));
       }
       FILE_OPERATION_LOOP_END(FMTLOAD(RENAME_AFTER_RESUME_ERROR, (ExtractFileName(DestPartialFullName), DestFileName)));
     }