summaryrefslogtreecommitdiff
path: root/gtk/gtkbookmarksmanager.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-08-08 10:41:57 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-08-08 11:48:32 -0400
commit8a67899e0f36243c6598ea089ad58d689f146e0d (patch)
treec90590536d5c89ae7246203ae6a0bc4b8529fce4 /gtk/gtkbookmarksmanager.c
parentbb30a2300454f0792bbedcc19bbeb51a8348f41c (diff)
downloadgtk+-8a67899e0f36243c6598ea089ad58d689f146e0d.tar.gz
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
Diffstat (limited to 'gtk/gtkbookmarksmanager.c')
-rw-r--r--gtk/gtkbookmarksmanager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkbookmarksmanager.c b/gtk/gtkbookmarksmanager.c
index 4fce669113..ed1ea063b3 100644
--- a/gtk/gtkbookmarksmanager.c
+++ b/gtk/gtkbookmarksmanager.c
@@ -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: