bookmarksmanager: Ignore delete events
Surpisingly, when a monitored file gets atomically replaced with g_file_set_contents(), the file monitor reports a DELETED event for the temp file, which is not the file I'm monitoring. Just ignore DELETED events. Fixes: #3036
This commit is contained in:
@@ -238,10 +238,10 @@ bookmarks_file_changed (GFileMonitor *monitor,
|
||||
case G_FILE_MONITOR_EVENT_CHANGED:
|
||||
case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT:
|
||||
case G_FILE_MONITOR_EVENT_CREATED:
|
||||
case G_FILE_MONITOR_EVENT_DELETED:
|
||||
g_file_load_contents_async (file, NULL, read_bookmarks_finish, manager);
|
||||
break;
|
||||
|
||||
case G_FILE_MONITOR_EVENT_DELETED:
|
||||
case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED:
|
||||
case G_FILE_MONITOR_EVENT_PRE_UNMOUNT:
|
||||
case G_FILE_MONITOR_EVENT_UNMOUNTED:
|
||||
|
||||
Reference in New Issue
Block a user