Fixed incorrect mask detection

This commit is contained in:
Samuel D. Crow 2023-10-11 18:17:44 -05:00
parent 784f644566
commit 3812c5ab0b

View file

@ -184,15 +184,15 @@ static bool traverseDirectoryRec(const std::string& path, const std::function<vo
mode = st.st_mode; mode = st.st_mode;
} }
if (mode & S_IFDIR) if (mode == S_IFDIR)
{ {
traverseDirectoryRec(buf, callback); traverseDirectoryRec(buf, callback);
} }
else if (mode & S_IFREG) else if (mode == S_IFREG)
{ {
callback(buf); callback(buf);
} }
else if (mode & S_IFLNK) else if (mode == S_IFLNK)
{ {
// Skip symbolic links to avoid handling cycles // Skip symbolic links to avoid handling cycles
} }