Przeglądaj źródła

Bug 2082: Workaround for calls to system API failing when used first time against some network shares (Samba) with paths over the legacy Windows limit

https://winscp.net/tracker/2082

Source commit: 382de6e533d4ac3c8161b9c282741491fb08dc97
Martin Prikryl 3 lat temu
rodzic
commit
7fca46e47d
1 zmienionych plików z 9 dodań i 1 usunięć
  1. 9 1
      source/core/Common.cpp

+ 9 - 1
source/core/Common.cpp

@@ -1597,7 +1597,15 @@ int __fastcall FileGetAttrFix(const UnicodeString FileName)
   {
     FollowLink = false;
   }
-  int Result = FileGetAttr(FileName, FollowLink);
+  int Result;
+  try
+  {
+    Result = FileGetAttr(FileName, FollowLink);
+  }
+  catch (EOSError & E)
+  {
+    Result = -1;
+  }
   if (Result < 0)
   {
     // When referring to files in some special symlinked locations