[dconf] keyfile: explicitly use local GVfs



commit ebbbb5393423ae071fb0b8fe8d4f2cce85bf11fd
Author: Ryan Lortie <desrt desrt ca>
Date:   Sat Jan 12 12:56:09 2013 -0500

    keyfile: explicitly use local GVfs
    
    Avoid initialising all of GVfs for dconf-service in order to monitor a
    local file for changes.
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=691618 for the
    possibility of a better fix.

 service/dconf-keyfile-writer.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/service/dconf-keyfile-writer.c b/service/dconf-keyfile-writer.c
index 29383f5..d5305a3 100644
--- a/service/dconf-keyfile-writer.c
+++ b/service/dconf-keyfile-writer.c
@@ -188,7 +188,8 @@ dconf_keyfile_writer_begin (DConfWriter  *writer,
       kfw->lock_filename = g_strconcat (kfw->filename, "-lock", NULL);
       g_free (filename_base);
 
-      file = g_file_new_for_path (kfw->filename);
+      /* See https://bugzilla.gnome.org/show_bug.cgi?id=691618 */
+      file = g_vfs_get_file_for_path (g_vfs_get_local (), kfw->filename);
       kfw->monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE, NULL, NULL);
       g_object_unref (file);
 



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