From e1a48b964544a9117dc0aea86964a036d9fec747 Mon Sep 17 00:00:00 2001 From: Adnan Alhomssi Date: Thu, 1 Jun 2023 18:06:36 +0200 Subject: [PATCH] Use tempdir() to store heap snapshot files instead of abspatch ~= rootdir --- stdlib/Profile/src/Profile.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Profile/src/Profile.jl b/stdlib/Profile/src/Profile.jl index 71bbfc70ee937..f0323d0334b1a 100644 --- a/stdlib/Profile/src/Profile.jl +++ b/stdlib/Profile/src/Profile.jl @@ -1234,7 +1234,7 @@ function take_heap_snapshot(filepath::String, all_one::Bool=false) return filepath end function take_heap_snapshot(all_one::Bool=false) - f = abspath("$(getpid())_$(time_ns()).heapsnapshot") + f = joinpath(tempdir(), "$(getpid())_$(time_ns()).heapsnapshot") return take_heap_snapshot(f, all_one) end