[Xfce4-commits] [xfce/exo] 01/01: Update mimeapps.list location for glib >= 2.41 (Bug #11504)

noreply at xfce.org noreply at xfce.org
Mon Feb 16 20:47:06 CET 2015


This is an automated email from the git hooks/post-receive script.

bluesabre pushed a commit to branch master
in repository xfce/exo.

commit f66cae70e73dbd503ee66656d89bc6d61851516e
Author: Thaddaeus Tintenfisch <thad.fisch at gmail.com>
Date:   Wed Feb 4 13:17:12 2015 +0100

    Update mimeapps.list location for glib >= 2.41 (Bug #11504)
    
    Signed-off-by: Sean Davis <smd.seandavis at gmail.com>
---
 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 */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list