Index: runtime/bin/file_patch.dart |
diff --git a/runtime/bin/file_patch.dart b/runtime/bin/file_patch.dart |
index 96a5d16692075832272b52890a6c07777eace102..196fb9e6c459ddf0c46dca2715681a91f0f32090 100644 |
--- a/runtime/bin/file_patch.dart |
+++ b/runtime/bin/file_patch.dart |
@@ -93,6 +93,13 @@ class _FileSystemWatcherImpl |
if ((event.type & _events) == 0) return; |
events.add(event); |
} |
+ void rewriteMove(event) { |
+ if (event[3]) { |
+ add(new FileSystemCreateEvent._(getPath(event))); |
+ } else { |
+ add(new FileSystemDeleteEvent._(getPath(event))); |
+ } |
+ } |
while (socket.available() > 0) { |
for (var event in _readEvents()) { |
if (event == null) continue; |
@@ -117,7 +124,7 @@ class _FileSystemWatcherImpl |
pair[link] = event; |
} |
} else { |
- add(new FileSystemMoveEvent._(path, null)); |
+ rewriteMove(event); |
} |
} |
if ((event[0] & FileSystemEvent.DELETE) != 0) { |
@@ -130,7 +137,7 @@ class _FileSystemWatcherImpl |
} |
} |
for (var event in pair.values) { |
- events.add(new FileSystemMoveEvent._(getPath(event), null)); |
+ rewriteMove(event); |
} |
} else if (event == RawSocketEvent.CLOSED) { |
} else if (event == RawSocketEvent.READ_CLOSED) { |