| Index: base/files/file_path_watcher_linux.cc
|
| diff --git a/base/files/file_path_watcher_linux.cc b/base/files/file_path_watcher_linux.cc
|
| index 2444b4453db2ce76c3745c1ec686efd991f29397..cabb034d6145e27702aebdba92c15ffbddd12b09 100644
|
| --- a/base/files/file_path_watcher_linux.cc
|
| +++ b/base/files/file_path_watcher_linux.cc
|
| @@ -10,6 +10,7 @@
|
| #include <sys/inotify.h>
|
| #include <sys/ioctl.h>
|
| #include <sys/select.h>
|
| +#include <sys/stat.h>
|
| #include <unistd.h>
|
|
|
| #include <algorithm>
|
| @@ -34,6 +35,7 @@
|
| #include "base/synchronization/lock.h"
|
| #include "base/threading/thread.h"
|
| #include "base/threading/thread_task_runner_handle.h"
|
| +#include "base/time/time.h"
|
| #include "base/trace_event/trace_event.h"
|
|
|
| namespace base {
|
| @@ -403,7 +405,10 @@ void FilePathWatcherImpl::OnFilePathChanged(InotifyReader::Watch fired_watch,
|
| if (target_changed ||
|
| (change_on_target_path && deleted) ||
|
| (change_on_target_path && created && PathExists(target_))) {
|
| - if (!did_update) {
|
| + struct stat child_stat;
|
| + stat(target_.Append(watch_entry.subdir).Append(child).value().c_str(),
|
| + &child_stat);
|
| + if (!did_update && S_ISDIR(child_stat.st_mode)) {
|
| UpdateRecursiveWatches(fired_watch, is_dir);
|
| did_update = true;
|
| }
|
|
|