Skip to content

Commit

Permalink
Fixed incorrect mask detection
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuraiCrow committed Oct 11, 2023
1 parent 784f644 commit 3812c5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CLI/FileUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ static bool traverseDirectoryRec(const std::string& path, const std::function<vo
mode = st.st_mode;
}

if (mode & S_IFDIR)
if (mode == S_IFDIR)
{
traverseDirectoryRec(buf, callback);
}
else if (mode & S_IFREG)
else if (mode == S_IFREG)
{
callback(buf);
}
else if (mode & S_IFLNK)
else if (mode == S_IFLNK)
{
// Skip symbolic links to avoid handling cycles
}
Expand Down

0 comments on commit 3812c5a

Please sign in to comment.