[gnome-settings-daemon] color: unbreak loading profiles at startup



commit b8527e5c30a9aea4f2ff5606508cf32822bb0654
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Oct 3 10:02:34 2011 -0400

    color: unbreak loading profiles at startup
    
    A recent commit broke color profile loading at startup if the profile
    directory exists already. Fix this.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=660790
    
    Signed-off-by: Richard Hughes <richard hughsie com>

 plugins/color/gcm-profile-store.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/color/gcm-profile-store.c b/plugins/color/gcm-profile-store.c
index d7d99cf..b32e195 100644
--- a/plugins/color/gcm-profile-store.c
+++ b/plugins/color/gcm-profile-store.c
@@ -446,13 +446,14 @@ gcm_profile_store_search (GcmProfileStore *profile_store)
         ret = gcm_profile_store_mkdir_with_parents (path,
                                                     profile_store->priv->cancellable,
                                                     &error);
-        if (!ret) {
+        if (!ret &&
+            !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_EXISTS)) {
                 g_warning ("failed to create directory on startup: %s", error->message);
-                g_error_free (error);
         } else {
                 gcm_profile_store_search_path (profile_store, path, 0);
         }
         g_free (path);
+        g_clear_error (&error);
 
         /* get per-user profiles from obsolete location */
         path = g_build_filename (g_get_home_dir (), ".color", "icc", NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]