Skip to content

Commit 67e375f

Browse files
authored
Merge pull request #1993 from compnerd/thats-a-negative-copy
2 parents a132f6e + ad2cf4e commit 67e375f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Foundation/FileManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,9 +857,9 @@ open class FileManager : NSObject {
857857
var faAttributes: WIN32_FILE_ATTRIBUTE_DATA = WIN32_FILE_ATTRIBUTE_DATA()
858858
return try path.withCString(encodedAs: UTF16.self) {
859859
if GetFileAttributesExW($0, GetFileExInfoStandard, &faAttributes) == FALSE {
860-
return faAttributes
860+
throw _NSErrorWithWindowsError(GetLastError(), reading: true)
861861
}
862-
throw _NSErrorWithWindowsError(GetLastError(), reading: true)
862+
return faAttributes
863863
}
864864
}
865865
#endif

0 commit comments

Comments
 (0)