ListDir不再返回.和..
This commit is contained in:
parent
221ec0708d
commit
eca430ca69
|
@ -19,6 +19,8 @@ vector<FileInfo> ListDir(const std::string& dirName)
|
||||||
{
|
{
|
||||||
FileInfo f;
|
FileInfo f;
|
||||||
f.name = std::string(findData.cFileName);
|
f.name = std::string(findData.cFileName);
|
||||||
|
if (f.name == "." || f.name == "..")
|
||||||
|
continue;
|
||||||
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||||
{
|
{
|
||||||
f.type = 1;
|
f.type = 1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user