Skip to content

Commit b46ec9d

Browse files
committed
When deleting, don't follow symlinks
1 parent 27f8f36 commit b46ec9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/file.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ function rm(path::AbstractString; force::Bool=false, recursive::Bool=false)
261261
try
262262
@static if Sys.iswindows()
263263
# is writable on windows actually means "is deletable"
264-
if (filemode(path) & 0o222) == 0
264+
if (filemode(lstat(path)) & 0o222) == 0
265265
chmod(path, 0o777)
266266
end
267267
end

0 commit comments

Comments
 (0)