We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
GetFileAttributesExW
FALSE
1 parent a132f6e commit ad2cf4eCopy full SHA for ad2cf4e
Foundation/FileManager.swift
@@ -857,9 +857,9 @@ open class FileManager : NSObject {
857
var faAttributes: WIN32_FILE_ATTRIBUTE_DATA = WIN32_FILE_ATTRIBUTE_DATA()
858
return try path.withCString(encodedAs: UTF16.self) {
859
if GetFileAttributesExW($0, GetFileExInfoStandard, &faAttributes) == FALSE {
860
- return faAttributes
+ throw _NSErrorWithWindowsError(GetLastError(), reading: true)
861
}
862
- throw _NSErrorWithWindowsError(GetLastError(), reading: true)
+ return faAttributes
863
864
865
#endif
0 commit comments