Fall back to $HOME/Desktop for the DESKTOP directory, like

2007-06-06  Matthias Clasen  <mclasen@redhat.com>

        * glib/gutils.c (g_get_user_special_dir): Fall back to
        $HOME/Desktop for the DESKTOP directory, like
        xdg_user_dir_lookup() does.


svn path=/trunk/; revision=5543
This commit is contained in:
Matthias Clasen 2007-06-06 19:05:53 +00:00 committed by Matthias Clasen
parent 9d1be184c1
commit f6f9877b50
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2007-06-06 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.c (g_get_user_special_dir): Fall back to
$HOME/Desktop for the DESKTOP directory, like
xdg_user_dir_lookup() does.
2007-06-05 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version

View File

@ -2436,7 +2436,15 @@ g_get_user_special_dir (GUserDirectory directory)
if (g_user_special_dirs == NULL)
{
g_user_special_dirs = g_new0 (gchar *, G_USER_N_DIRECTORIES);
load_user_special_dirs ();
/* Special-case desktop for historical compatibility */
if (g_user_special_dirs[G_USER_DIRECTORY_DESKTOP] == NULL)
{
g_get_any_init ();
g_user_special_dirs[directory] = g_build_filename (g_home_dir, "Desktop", NULL);
}
}
G_UNLOCK (g_utils_global);