From: Carlos Garcia Campos Date: Mon, 3 May 2010 15:08:57 +0000 (+0200) Subject: [ev-daemon] Respect GNOME22_USER_DIR env variable X-Git-Tag: EVINCE_2_31_1~12 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=76b398e459ef2f02942b903f01e69e34c17db8f5;p=evince.git [ev-daemon] Respect GNOME22_USER_DIR env variable --- diff --git a/shell/ev-daemon.c b/shell/ev-daemon.c index 88440274..d767c495 100644 --- a/shell/ev-daemon.c +++ b/shell/ev-daemon.c @@ -385,14 +385,20 @@ convert_metadata (const gchar *metadata) static void ev_migrate_metadata (void) { - gchar *updated; - gchar *metadata; - gchar *dot_dir; - - dot_dir = g_build_filename (g_get_home_dir (), - ".gnome2", - "evince", - NULL); + gchar *updated; + gchar *metadata; + gchar *dot_dir; + const gchar *userdir; + + userdir = g_getenv ("GNOME22_USER_DIR"); + if (userdir) { + dot_dir = g_build_filename (userdir, "evince", NULL); + } else { + dot_dir = g_build_filename (g_get_home_dir (), + ".gnome2", + "evince", + NULL); + } updated = g_build_filename (dot_dir, "migrated-to-gvfs", NULL); if (g_file_test (updated, G_FILE_TEST_EXISTS)) {