[glib] GKeyFileSettingsBackend: ignore file deletions
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GKeyFileSettingsBackend: ignore file deletions
- Date: Mon, 28 Oct 2013 00:28:02 +0000 (UTC)
commit 1fba61981a80c7a536113ba55f5a6acee8cd230c
Author: Matthew Barnes <mbarnes redhat com>
Date: Sun Oct 27 17:26:33 2013 -0700
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 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c
index 6601eba..6f97da4 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]