From 1564435bbdc9c59da7fa19f7dbc5ad20600893ac Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 1 Dec 2022 13:04:54 +0100 Subject: [PATCH] pstats: Move last session and layout files to $XDG_STATE_HOME on Linux This is a new directory that is slightly more persistent than $XDG_CACHE_HOME --- pandatool/src/gtk-stats/gtkStatsServer.cxx | 2 +- pandatool/src/pstatserver/pStatMonitor.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandatool/src/gtk-stats/gtkStatsServer.cxx b/pandatool/src/gtk-stats/gtkStatsServer.cxx index 3f9ed4ccee..ccf78fb9c3 100644 --- a/pandatool/src/gtk-stats/gtkStatsServer.cxx +++ b/pandatool/src/gtk-stats/gtkStatsServer.cxx @@ -26,7 +26,7 @@ GtkStatsServer() { _last_session = Filename::expand_from( "$HOME/Library/Caches/Panda3D-" PANDA_ABI_VERSION_STR "/last-session.pstats"); #else - _last_session = Filename::expand_from("$XDG_CACHE_HOME/panda3d/last-session.pstats"); + _last_session = Filename::expand_from("$XDG_STATE_HOME/panda3d/last-session.pstats"); #endif _last_session.set_binary(); diff --git a/pandatool/src/pstatserver/pStatMonitor.cxx b/pandatool/src/pstatserver/pStatMonitor.cxx index 11286f5558..d2bd8e3953 100644 --- a/pandatool/src/pstatserver/pStatMonitor.cxx +++ b/pandatool/src/pstatserver/pStatMonitor.cxx @@ -33,7 +33,7 @@ static const Filename layout_filename = Filename::binary_filename( #elif defined(__APPLE__) Filename::expand_from("$HOME/Library/Caches/Panda3D-" PANDA_ABI_VERSION_STR "/pstats-layout") #else - Filename::expand_from("$XDG_CACHE_HOME/panda3d/pstats-layout") + Filename::expand_from("$XDG_STATE_HOME/panda3d/pstats-layout") #endif );