Index: runtime/bin/file_system_watcher_win.cc |
diff --git a/runtime/bin/file_system_watcher_win.cc b/runtime/bin/file_system_watcher_win.cc |
index 014d861439615c59ee9cefad579ab9d91301b753..49af0e38fdb2bb14deea693bd3587f25e5ee3c21 100644 |
--- a/runtime/bin/file_system_watcher_win.cc |
+++ b/runtime/bin/file_system_watcher_win.cc |
@@ -49,8 +49,11 @@ intptr_t FileSystemWatcher::WatchPath(const char* path, |
} |
if (events & kModifyContent) list_events |= FILE_NOTIFY_CHANGE_LAST_WRITE; |
- return reinterpret_cast<intptr_t>( |
- new DirectoryWatchHandle(dir, list_events, recursive)); |
+ DirectoryWatchHandle* handle = |
+ new DirectoryWatchHandle(dir, list_events, recursive); |
+ handle->EnsureInitialized(EventHandler::delegate()); |
Søren Gjesse
2013/10/02 10:53:34
Please add a comment here on why this is done.
Anders Johnsen
2013/10/02 11:09:55
Done.
|
+ handle->IssueRead(); |
+ return reinterpret_cast<intptr_t>(handle); |
} |