[gnome-settings-daemon] color: Do not try to parse .goutputstream files



commit 96b3a1d980f3ccd2a9f42ca669592014c0a9b44c
Author: Richard Hughes <richard hughsie com>
Date:   Fri Apr 26 11:10:28 2013 +0100

    color: Do not try to parse .goutputstream files
    
    When cd_icc_save_file() is called it uses g_file_replace_contents().
    This creates the .goutputstream momentarily which is picked up by the directory
    watch on ~/.local/share/icc.
    
    Getting the info never succeeds as the files have vanished before they can be
    read and a nasty error is stored in the journal.

 plugins/color/gcm-profile-store.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/plugins/color/gcm-profile-store.c b/plugins/color/gcm-profile-store.c
index ee81925..bdb143f 100644
--- a/plugins/color/gcm-profile-store.c
+++ b/plugins/color/gcm-profile-store.c
@@ -224,6 +224,13 @@ gcm_profile_store_file_monitor_changed_cb (GFileMonitor *monitor,
                 goto out;
         }
 
+        /* ignore temp files */
+        path = g_file_get_path (file);
+        if (g_strrstr (path, ".goutputstream") != NULL) {
+                g_debug ("ignoring gvfs temporary file");
+                goto out;
+        }
+
         /* only care about created objects */
         if (event_type == G_FILE_MONITOR_EVENT_CREATED) {
                 g_file_query_info_async (file,


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