Skip to content

Commit 65a378d

Browse files
authored
Merge pull request #2194 from compnerd/failure-is-success
Foundation: allow failure in attribute query
2 parents 0e4b844 + a3f5cc0 commit 65a378d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/FileManager+Win32.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ extension FileManager {
405405
guard alreadyConfirmed || shouldRemoveItemAtPath(path, isURL: isURL) else {
406406
return
407407
}
408-
let faAttributes = try! windowsFileAttributes(atPath: path)
408+
let faAttributes = try windowsFileAttributes(atPath: path)
409409
if faAttributes.dwFileAttributes & DWORD(FILE_ATTRIBUTE_DIRECTORY) == 0 {
410410
if !path.withCString(encodedAs: UTF16.self, DeleteFileW) {
411411
throw _NSErrorWithWindowsError(GetLastError(), reading: false)

0 commit comments

Comments
 (0)