Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2841)

Unified Diff: runtime/bin/file_system_watcher_linux.cc

Issue 48513003: If a move has matching target/destination, signal the event as create or delete. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix list size Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/file_system_watcher_android.cc ('k') | runtime/bin/file_system_watcher_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_system_watcher_linux.cc
diff --git a/runtime/bin/file_system_watcher_linux.cc b/runtime/bin/file_system_watcher_linux.cc
index da5dee1ec77b56592c766ca363cac64fa9fa17d9..7cfb28eb161ae88b85d080035d9dd70af2a6ab4f 100644
--- a/runtime/bin/file_system_watcher_linux.cc
+++ b/runtime/bin/file_system_watcher_linux.cc
@@ -63,7 +63,7 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id) {
while (offset < bytes) {
struct inotify_event* e =
reinterpret_cast<struct inotify_event*>(buffer + offset);
- Dart_Handle event = Dart_NewList(3);
+ Dart_Handle event = Dart_NewList(4);
int mask = 0;
if (e->mask & IN_MODIFY) mask |= kModifyContent;
if (e->mask & IN_ATTRIB) mask |= kModefyAttribute;
@@ -79,6 +79,7 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id) {
} else {
Dart_ListSetAt(event, 2, Dart_Null());
}
+ Dart_ListSetAt(event, 3, Dart_NewBoolean(e->mask & IN_MOVED_TO));
Dart_ListSetAt(events, i, event);
i++;
offset += kEventSize + e->len;
« no previous file with comments | « runtime/bin/file_system_watcher_android.cc ('k') | runtime/bin/file_system_watcher_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698