Skip to content

Commit de1daf4

Browse files
committed
Remove useless codes
1 parent 6735660 commit de1daf4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Sources/Foundation/FileManager+Win32.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -709,12 +709,9 @@ extension FileManager {
709709
}
710710

711711
internal func _isExecutableFile(atPath path: String) -> Bool {
712-
var isDirectory: ObjCBool = false
713-
guard fileExists(atPath: path, isDirectory: &isDirectory) else { return false }
714-
guard !isDirectory.boolValue, _isReadableFile(atPath: path) else { return false }
712+
var binaryType = DWORD(0)
715713
return path.withCString(encodedAs: UTF16.self) {
716-
var binaryType = DWORD(0)
717-
return GetBinaryTypeW($0, &binaryType)
714+
GetBinaryTypeW($0, &binaryType)
718715
}
719716
}
720717

0 commit comments

Comments
 (0)