Skip to content

Commit 3b2cebc

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 44734d5 commit 3b2cebc

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
@@ -1271,7 +1271,7 @@ function take_heap_snapshot(filepath::String, all_one::Bool=false)
12711271
return filepath
12721272
end
12731273
function take_heap_snapshot(all_one::Bool=false)
1274-
f = abspath("$(getpid())_$(time_ns()).heapsnapshot")
1274+
f = joinpath(tempdir(), "$(getpid())_$(time_ns()).heapsnapshot")
12751275
return take_heap_snapshot(f, all_one)
12761276
end
12771277

0 commit comments

Comments
 (0)