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

Unified Diff: base/directory_watcher_win.cc

Issue 13255: Properly fix DirWatcherTest.SubDir on Vista. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years 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 | « base/directory_watcher_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/directory_watcher_win.cc
===================================================================
--- base/directory_watcher_win.cc (revision 6529)
+++ base/directory_watcher_win.cc (working copy)
@@ -42,12 +42,15 @@
bool DirectoryWatcher::Impl::Watch(const FilePath& path) {
DCHECK(path_.value().empty()); // Can only watch one path.
+ DCHECK(path.IsAbsolute()); // FindFirstChangeNotification requires it.
handle_ = FindFirstChangeNotification(
path.value().c_str(),
FALSE, // Don't watch subtree.
- FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_SIZE |
- FILE_NOTIFY_CHANGE_LAST_WRITE);
+ FILE_NOTIFY_CHANGE_FILE_NAME |
+ FILE_NOTIFY_CHANGE_DIR_NAME |
+ FILE_NOTIFY_CHANGE_SIZE |
+ FILE_NOTIFY_CHANGE_LAST_WRITE);
if (handle_ == INVALID_HANDLE_VALUE) {
NOTREACHED();
return false;
« no previous file with comments | « base/directory_watcher_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698