Skip to content

Commit

Permalink
rm: When checking filemode(), use lstat() to avoid following syml…
Browse files Browse the repository at this point in the history
…inks
  • Loading branch information
staticfloat committed Mar 5, 2020
1 parent 7c2efcd commit 6e2177e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ function rm(path::AbstractString; force::Bool=false, recursive::Bool=false)
try
@static if Sys.iswindows()
# is writable on windows actually means "is deletable"
if (filemode(path) & 0o222) == 0
if (filemode(lstat(path)) & 0o222) == 0
chmod(path, 0o777)
end
end
Expand Down

0 comments on commit 6e2177e

Please sign in to comment.