Skip to content

Commit c7e9d9f

Browse files
temp cleanup: wrap rm in try-catch (JuliaLang#33794)
1 parent 81fb410 commit c7e9d9f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

base/file.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,10 @@ function temp_cleanup_purge(all::Bool=true)
483483
if (all || asap) && ispath(path)
484484
need_gc && GC.gc(true)
485485
need_gc = false
486-
rm(path, recursive=true, force=true)
486+
try rm(path, recursive=true, force=true)
487+
catch ex
488+
@warn "temp cleanup" _group=:file exception=(ex, catch_backtrace())
489+
end
487490
end
488491
!ispath(path) && delete!(TEMP_CLEANUP, path)
489492
end

0 commit comments

Comments
 (0)