From a7705d935d9ebc0c5e063a80ea702ee1ac4b3676 Mon Sep 17 00:00:00 2001 From: Thaddaeus Tintenfisch Date: Wed, 4 Feb 2015 13:17:12 +0100 Subject: [PATCH] Update mimeapps.list location for glib >= 2.41 (Bug #11504) --- exo-helper/exo-helper.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/exo-helper/exo-helper.c b/exo-helper/exo-helper.c index a3a8c60..37d8901 100644 --- a/exo-helper/exo-helper.c +++ b/exo-helper/exo-helper.c @@ -716,11 +716,16 @@ exo_helper_database_set_default (ExoHelperDatabase *database, } /* open the mimeapp.list file to set the default handler of the mime type */ - rc = xfce_rc_config_open (XFCE_RESOURCE_DATA, "applications/mimeapps.list", FALSE); + rc = xfce_rc_config_open (XFCE_RESOURCE_CONFIG, "mimeapps.list", FALSE); if (G_UNLIKELY (rc == NULL)) { - g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_IO, _("Failed to open %s for writing"), "mimeapps.list"); - return FALSE; + /* deprecated location (glib < 2.41) */ + rc = xfce_rc_config_open (XFCE_RESOURCE_DATA, "applications/mimeapps.list", FALSE); + if (G_UNLIKELY (rc == NULL)) + { + g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_IO, _("Failed to open %s for writing"), "mimeapps.list"); + return FALSE; + } } /* open the exo desktop file to read the mimetypes the file supports */ -- 2.1.4