浏览代码

Bug 1725: Local directories with path long between 248 and 259 characters could not be created

https://winscp.net/tracker/1725
(cherry picked from commit 205a2a956ffce7a6ef887aa9d554df777af81c4c)

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

+ 2 - 1
source/core/Common.cpp

@@ -1117,7 +1117,8 @@ UnicodeString __fastcall ApiPath(UnicodeString Path)
     Path = ExpandFileName(Path);
   }
 
-  if (Path.Length() >= MAX_PATH)
+  // Max path for directories is 12 characters shorter than max path for files
+  if (Path.Length() >= MAX_PATH - 12)
   {
     if (Configuration != NULL)
     {