file monitors: fix a typo

Due to a typo, a rename reported via a pair of delete/create events (due
to the watcher not giving the flag for moves to be paired) was
accidentally reported as being created with the old name instead of the
new name.

Fix that.
This commit is contained in:
Ryan Lortie 2015-03-25 23:08:38 -04:00
parent 4a292721bc
commit 706c4d32ad

View File

@ -408,13 +408,14 @@ g_file_monitor_source_handle_event (GFileMonitorSource *fms,
other = g_local_file_new_from_dirname_and_basename (fms->dirname, rename_to);
g_file_monitor_source_file_changes_done (fms, rename_to);
g_print ("send %s %s\n", child, g_file_get_path (other));
g_file_monitor_source_send_event (fms, G_FILE_MONITOR_EVENT_MOVED, child, other);
g_object_unref (other);
}
else
{
g_file_monitor_source_send_event (fms, G_FILE_MONITOR_EVENT_DELETED, child, NULL);
g_file_monitor_source_send_synthetic_created (fms, child);
g_file_monitor_source_send_synthetic_created (fms, rename_to);
}
break;