mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
filesystemmodel: Ignore changes on the parent directory
The filesystemmodel tracks changes and additions to child files through G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED. This event will also occur if the parent directory is changed. Since the parent directory doesn't exist in the model, it creates a non-existent item. Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4233
This commit is contained in:
parent
ef2024736d
commit
133231e12b
@ -747,7 +747,9 @@ gtk_file_system_model_monitor_change (GFileMonitor * monitor,
|
||||
case G_FILE_MONITOR_EVENT_CREATED:
|
||||
case G_FILE_MONITOR_EVENT_CHANGED:
|
||||
case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED:
|
||||
/* We can treat all of these the same way */
|
||||
if (g_file_equal (file, model->dir))
|
||||
return;
|
||||
/* We can treat all children the same way */
|
||||
g_file_query_info_async (file,
|
||||
model->attributes,
|
||||
G_FILE_QUERY_INFO_NONE,
|
||||
|
Loading…
Reference in New Issue
Block a user