[Base] Filter out relative directories on linux

This commit is contained in:
Roy Stewart 2023-02-03 02:43:51 -05:00 committed by Rick Gibbed
parent 41c423109f
commit 07e81fe172
1 changed files with 4 additions and 0 deletions

View File

@ -217,6 +217,10 @@ std::vector<FileInfo> ListFiles(const std::filesystem::path& path) {
}
while (auto ent = readdir(dir)) {
if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) {
continue;
}
FileInfo info;
info.name = ent->d_name;