Skip to content

Commit

Permalink
Test for Windows delete permissions in system folders (#39078)
Browse files Browse the repository at this point in the history
(cherry picked from commit ed89ae7)
  • Loading branch information
musm authored and staticfloat committed Dec 22, 2022
1 parent dbb47c1 commit 448382f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1543,3 +1543,16 @@ end
chmod(dir, 0o777; recursive=true)
end
end

if Sys.iswindows()
@testset "mkdir/rm permissions" begin
# test delete permission in system folders (i.e. impliclty test chmod permissions)
# issue #38433
@test withenv("TMP" => "C:\\") do
mktempdir() do dir end
end === nothing
# same as above, but test rm explicitly
tmp = mkdir(tempname("C:\\"))
@test rm(tmp) === nothing
end
end

0 comments on commit 448382f

Please sign in to comment.