Bläddra i källkod

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: fb33420ef450d8f4b0734da95c265b884b34dde4
Martin Prikryl 6 år sedan
förälder
incheckning
0df91458e7
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      source/core/Common.cpp

+ 2 - 1
source/core/Common.cpp

@@ -1166,7 +1166,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)
     {