ListDir不再返回.和..

trival
Kirigaya Kazuto 2019-08-10 21:35:37 +08:00
parent 221ec0708d
commit eca430ca69
1 changed files with 2 additions and 0 deletions

View File

@ -19,6 +19,8 @@ vector<FileInfo> ListDir(const std::string& dirName)
{
FileInfo f;
f.name = std::string(findData.cFileName);
if (f.name == "." || f.name == "..")
continue;
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
f.type = 1;