Skip to content

Commit

Permalink
isfile_casesensitive: check if path in fail fast too
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Jul 23, 2024
1 parent 5f141b8 commit 0720fbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ if Sys.isunix() && !Sys.isapple()
elseif Sys.iswindows()
# GetLongPathName Win32 function returns the case-preserved filename on NTFS.
function isfile_casesensitive(path)
isaccessiblefile(path) || return false # Fail fast
isaccessiblepath(path) || return false # Fail fast. Not a path when case insensitive
isaccessiblefile(path) || return false # Fail fast. Not a file when case insensitive
basename(Filesystem.longpath(path)) == basename(path)
end
elseif Sys.isapple()
Expand Down

0 comments on commit 0720fbb

Please sign in to comment.