Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions rofs-filtered.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,13 @@ static int should_hide(const char *name, mode_t mode) {
for (int i = 0; i < modes_count; ++i)
if (mode == modes[i]) {
log_msg(LOG_DEBUG, "type: %07o %s", mode, name);
if (conf.invert)
goto allow_type;
return !conf.invert;
}
if (conf.invert && mode != S_IFREG && mode != S_IFDIR)
return conf.invert;
allow_type:
if (!regexec(&pattern, name, 0, NULL, 0)) {
// We have a match.
log_msg(LOG_DEBUG, "match: %s", name);
Expand Down