ソースを参照

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
(cherry picked from commit 7fca46e47d11a38ef5d5ca74e9752b751f839177)

Source commit: 4eeec091eaf87e5f36189be6f1d85fb61d90c118
Martin Prikryl 3 年 前
コミット
d15f7d4b53
1 ファイル変更9 行追加1 行削除
  1. 9 1
      source/core/Common.cpp

+ 9 - 1
source/core/Common.cpp

@@ -1596,7 +1596,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