Skip to content

Commit 27207fe

Browse files
authored
Merge pull request #2133 from pvieito/patch-2
2 parents 92bbdd1 + 9cd3a53 commit 27207fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Foundation/FileManager+Win32.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,9 @@ extension FileManager {
497497
}
498498

499499
internal func _isExecutableFile(atPath path: String) -> Bool {
500-
// FIXME(compnerd) is there some test that we can perform here?
501-
return true
500+
var isDirectory: ObjCBool = false
501+
guard fileExists(atPath: path, isDirectory: &isDirectory) else { return false }
502+
return !isDirectory.boolValue && _isReadableFile(atPath: path)
502503
}
503504

504505
internal func _isDeletableFile(atPath path: String) -> Bool {

0 commit comments

Comments
 (0)