Skip to content

Commit afb80a1

Browse files
Adnan AlhomssiKristofferC
authored andcommitted
Use tempdir() to store heap snapshot files instead of abspatch ~= rootdir (#50026)
(cherry picked from commit 877b368)
1 parent f250b76 commit afb80a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/Profile/src/Profile.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ function take_heap_snapshot(filepath::String, all_one::Bool=false)
12341234
return filepath
12351235
end
12361236
function take_heap_snapshot(all_one::Bool=false)
1237-
f = abspath("$(getpid())_$(time_ns()).heapsnapshot")
1237+
f = joinpath(tempdir(), "$(getpid())_$(time_ns()).heapsnapshot")
12381238
return take_heap_snapshot(f, all_one)
12391239
end
12401240

0 commit comments

Comments
 (0)