From 1fba61981a80c7a536113ba55f5a6acee8cd230c Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 27 Oct 2013 17:26:33 -0700 Subject: [PATCH] GKeyFileSettingsBackend: ignore file deletions Ignore the keyfile being deleted (ie: by the user) instead of reporting it to the application as all values being reverted back to their originals. https://bugzilla.gnome.org/show_bug.cgi?id=637956 --- gio/gkeyfilesettingsbackend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c index 6601eba68..6f97da4f3 100644 --- a/gio/gkeyfilesettingsbackend.c +++ b/gio/gkeyfilesettingsbackend.c @@ -550,7 +550,9 @@ file_changed (GFileMonitor *monitor, { GKeyfileSettingsBackend *kfsb = user_data; - g_keyfile_settings_backend_keyfile_reload (kfsb); + /* Ignore file deletions, let the GKeyFile content remain in tact. */ + if (event_type != G_FILE_MONITOR_EVENT_DELETED) + g_keyfile_settings_backend_keyfile_reload (kfsb); } static void -- 2.34.1