diff options
Diffstat (limited to 'server/src/inotify.cc')
-rw-r--r-- | server/src/inotify.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server/src/inotify.cc b/server/src/inotify.cc index 5fb983e..1515387 100644 --- a/server/src/inotify.cc +++ b/server/src/inotify.cc @@ -264,10 +264,12 @@ void INotify::addDirectory(std::string name, depth_t depth, uint32_t mask) struct dirent *dirent; while( (dirent = readdir(dir)) != NULL ) { - if(std::string(dirent->d_name) == "." || std::string(dirent->d_name) == "..") + if(std::string(dirent->d_name) == "." || + std::string(dirent->d_name) == "..") continue; - if(isdir(name+"/"+dirent->d_name)) addDirectory(name+"/"+dirent->d_name, depth, mask); + if(isdir(name+"/"+dirent->d_name)) + addDirectory(name+"/"+dirent->d_name, depth, mask); } closedir(dir); @@ -348,7 +350,8 @@ void INotify::readEvents() addDirectory(dirmap[event->wd].name + "/" + event->name, dirmap[event->wd].depth, dirmap[event->wd].mask); - if(TEST(event->mask, IN_CREATE) && !TEST(dirmap[event->wd].mask, IN_CREATE)) { + if(TEST(event->mask, IN_CREATE) && + !TEST(dirmap[event->wd].mask, IN_CREATE)) { // Ignore this event, it was not requested by the user. } else { eventlist.push_back(INotify::Event(event, dirmap[event->wd].name)); |