소스 검색

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 년 전
부모
커밋
7fca46e47d
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  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