[gnome-settings-daemon] color: Check if the auto-edid path exists before trying to create it



commit 478827971dc77aa9b6a90eab0dc6d202c7321d86
Author: Richard Hughes <richard hughsie com>
Date:   Mon Jun 13 16:03:45 2011 +0100

    color: Check if the auto-edid path exists before trying to create it

 plugins/color/gsd-color-manager.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/color/gsd-color-manager.c b/plugins/color/gsd-color-manager.c
index 789d841..e263b0e 100644
--- a/plugins/color/gsd-color-manager.c
+++ b/plugins/color/gsd-color-manager.c
@@ -476,7 +476,10 @@ gcm_utils_mkdir_for_filename (const gchar *filename, GError **error)
                 goto out;
         }
 
-        /* ensure desination exists */
+        /* ensure desination does not already exist */
+        ret = g_file_query_exists (parent_dir, NULL);
+        if (ret)
+                goto out;
         ret = g_file_make_directory_with_parents (parent_dir, NULL, error);
         if (!ret)
                 goto out;



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