enumerate_directory: Don't list . and ..
This commit is contained in:
parent
f054cfb61c
commit
67484f1ea5
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ std::set<std::string> enumerate_directory(const std::string& dir, const std::str
|
|||
return x;
|
||||
}
|
||||
while((d2 = readdir(d)))
|
||||
if(regex_match(match, d2->d_name))
|
||||
if(regex_match(match, d2->d_name) && strcmp(d2->d_name, ".") && strcmp(d2->d_name, ".."))
|
||||
x.insert(dir + "/" + d2->d_name);
|
||||
closedir(d);
|
||||
return x;
|
||||
|
|
Loading…
Add table
Reference in a new issue