[glib] file monitors: fix a typo



commit 706c4d32adfbca25cdb0663077aa0d82477fb356
Author: Ryan Lortie <desrt desrt ca>
Date:   Wed Mar 25 23:08:38 2015 -0400

    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.

 gio/glocalfilemonitor.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gio/glocalfilemonitor.c b/gio/glocalfilemonitor.c
index ca334b1..28f4c98 100644
--- a/gio/glocalfilemonitor.c
+++ b/gio/glocalfilemonitor.c
@@ -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;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]