File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -146,29 +146,18 @@ TFileSystemEventPtr Inotify::getNextEvent()
146146 }
147147
148148 int i = 0 ;
149-
150149 while (i < length && isRunning ()) {
151150
152- auto event = reinterpret_cast <inotify_event*>(&buffer[i]);
151+ const auto * event = reinterpret_cast <inotify_event*>(&buffer[i]);
153152 if (!event)
154153 return nullptr ;
155154
156- /* if (event->mask & IN_IGNORED) {
157- i += EVENT_SIZE + event->len;
158- mDirectorieMap.erase(event->wd);
159- continue;
160- }*/
161- auto path = wdToPath (event->wd );
162-
163- if (std::filesystem::is_directory (path))
164- event->mask |= IN_ISDIR;
165-
155+ const auto path = wdToPath (event->wd );
166156 if (!isIgnoredOnce (path)) {
167157 _Queue.push (std::make_shared<FileSystemEvent>(path,
168158 _EventHandler.getInotify (
169159 static_cast <uint32_t >(event->mask ))));
170160 }
171-
172161 i += EVENT_SIZE + event->len ;
173162 }
174163 }
You can’t perform that action at this time.
0 commit comments