Skip to content

Commit

Permalink
When deleting, don't follow symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Mar 5, 2020
1 parent 27f8f36 commit b46ec9d
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 b46ec9d

Please sign in to comment.