Skip to content

Commit 6022b53

Browse files
authored
Merge pull request #1911 from compnerd/freedom
Windows: make _NSErrorWithWindowsError easier to use
2 parents 1a81780 + 9ca1e17 commit 6022b53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/FoundationErrors.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ internal func _NSErrorWithErrno(_ posixErrno : Int32, reading : Bool, path : Str
207207
// https://docs.microsoft.com/en-us/windows/desktop/Debug/system-error-codes
208208
internal let _NSWindowsErrorDomain = "org.swift.Foundation.WindowsError"
209209

210-
internal func _NSErrorWithWindowsError(_ windowsError: Int32, reading: Bool) -> NSError {
210+
internal func _NSErrorWithWindowsError(_ windowsError: DWORD, reading: Bool) -> NSError {
211211
// <#TODO#> os(Windows): Map Win32 errors to Cocoa errors as _NSErrorWithErrno() does.
212212
let code: CocoaError.Code = reading ? .fileReadUnknown : .fileWriteUnknown
213213
return NSError(domain: NSCocoaErrorDomain, code: code.rawValue, userInfo: [

0 commit comments

Comments
 (0)