mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-19 08:27:52 +02:00
utils: Add XDG_STATE_HOME support
This commit is contained in:
committed by
Emmanuele Bassi
parent
8ca2a7d7c8
commit
68eab1d999
@@ -688,6 +688,15 @@ test_xdg_dirs (void)
|
||||
g_assert_cmpstr (dir, ==, xdg);
|
||||
g_free (xdg);
|
||||
|
||||
xdg = g_strdup (g_getenv ("XDG_STATE_HOME"));
|
||||
if (!xdg)
|
||||
xdg = g_build_filename (g_get_home_dir (), ".local/state", NULL);
|
||||
|
||||
dir = g_get_user_state_dir ();
|
||||
|
||||
g_assert_cmpstr (dir, ==, xdg);
|
||||
g_free (xdg);
|
||||
|
||||
xdg = g_strdup (g_getenv ("XDG_RUNTIME_DIR"));
|
||||
if (!xdg)
|
||||
xdg = g_strdup (g_get_user_cache_dir ());
|
||||
|
Reference in New Issue
Block a user