Skip to content

Commit 096c0d5

Browse files
committed
remove IN_ISDIR support yet and zap dead code
1 parent 86731fb commit 096c0d5

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

source/inotify.cpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)