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.
2 parents 0e4b844 + a3f5cc0 commit 65a378dCopy full SHA for 65a378d
Foundation/FileManager+Win32.swift
@@ -405,7 +405,7 @@ extension FileManager {
405
guard alreadyConfirmed || shouldRemoveItemAtPath(path, isURL: isURL) else {
406
return
407
}
408
- let faAttributes = try! windowsFileAttributes(atPath: path)
+ let faAttributes = try windowsFileAttributes(atPath: path)
409
if faAttributes.dwFileAttributes & DWORD(FILE_ATTRIBUTE_DIRECTORY) == 0 {
410
if !path.withCString(encodedAs: UTF16.self, DeleteFileW) {
411
throw _NSErrorWithWindowsError(GetLastError(), reading: false)
0 commit comments