mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 18:40:58 +01:00
file monitors: report MOVED only with both sides
Make sure we know the destination file before reporting a MOVED event. Otherwise, we should just fall back to reporting it as a DELETED. https://bugzilla.gnome.org/show_bug.cgi?id=751731
This commit is contained in:
parent
c5221f8aea
commit
7ed76a4eca
@ -385,7 +385,7 @@ g_file_monitor_source_handle_event (GFileMonitorSource *fms,
|
|||||||
g_assert (!rename_to);
|
g_assert (!rename_to);
|
||||||
if (fms->flags & G_FILE_MONITOR_WATCH_MOVES)
|
if (fms->flags & G_FILE_MONITOR_WATCH_MOVES)
|
||||||
g_file_monitor_source_send_event (fms, G_FILE_MONITOR_EVENT_MOVED_OUT, child, other);
|
g_file_monitor_source_send_event (fms, G_FILE_MONITOR_EVENT_MOVED_OUT, child, other);
|
||||||
else if (fms->flags & G_FILE_MONITOR_SEND_MOVED)
|
else if (other && (fms->flags & G_FILE_MONITOR_SEND_MOVED))
|
||||||
g_file_monitor_source_send_event (fms, G_FILE_MONITOR_EVENT_MOVED, child, other);
|
g_file_monitor_source_send_event (fms, G_FILE_MONITOR_EVENT_MOVED, child, other);
|
||||||
else
|
else
|
||||||
g_file_monitor_source_send_event (fms, G_FILE_MONITOR_EVENT_DELETED, child, NULL);
|
g_file_monitor_source_send_event (fms, G_FILE_MONITOR_EVENT_DELETED, child, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user