From 3b2cebc9092258ab2f39adc3a34ac6e45881b375 Mon Sep 17 00:00:00 2001 From: Adnan Alhomssi Date: Wed, 5 Jul 2023 12:16:01 +0200 Subject: [PATCH] Use tempdir() to store heap snapshot files instead of abspatch ~= rootdir (#50026) (cherry picked from commit 877b368d78f9fbb6bb698f40f6e9c725ef057bd0) --- 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 6dd2a12205b66..986767f3f4396 100644 --- a/stdlib/Profile/src/Profile.jl +++ b/stdlib/Profile/src/Profile.jl @@ -1271,7 +1271,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