From 0772c36fb654ca2df6d8d847b9e70e22d23cdc52 Mon Sep 17 00:00:00 2001 From: Lionel Le Folgoc Date: Thu, 7 Apr 2011 10:12:18 +0200 Subject: Respect XDG priorities when returning the menu file (Bug #7470) 799e206b introduced a fallback that is supposed to try SYSCONFIGDIR/menus/xfce-applications.menu when no menu file was found in $XDG_CONFIG_DIRS. However, this doesn't work as expected, as SYSCONFIGDIR/menus/xfce-applications.menu is always returned instead, and overrides any menu in $XDG_CONFIG_DIRS. --- garcon/garcon-config.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/garcon/garcon-config.c b/garcon/garcon-config.c index 9f69f58..9f0c789 100644 --- a/garcon/garcon-config.c +++ b/garcon/garcon-config.c @@ -179,11 +179,11 @@ garcon_config_lookup (const gchar *filename) { /* Build the filename, if the file exists return the path */ path = g_build_filename (dirs[i], filename, NULL); - if (!g_path_is_absolute (path) || !g_file_test (path, G_FILE_TEST_IS_REGULAR)) - { - g_free (path); - path = NULL; - } + if (g_path_is_absolute (path) && g_file_test (path, G_FILE_TEST_IS_REGULAR)) + return path; + + g_free (path); + path = NULL; } /* Also try the install prefix of garcon in case XDG_CONFIG_DIRS is not -- 1.7.4.1