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
This commit is contained in:
Matthew Barnes 2013-10-27 17:26:33 -07:00 committed by Ryan Lortie
parent ef57996f44
commit 1fba61981a

View File

@ -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