Removed "." and ".." from cFile:GetFolderContents(). (#3301)
This commit is contained in:
parent
9fe4333f56
commit
876496c953
@ -524,6 +524,13 @@ AStringVector cFile::GetFolderContents(const AString & a_Folder)
|
|||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
if (
|
||||||
|
(strcmp(FindFileData.cFileName, ".") == 0) ||
|
||||||
|
(strcmp(FindFileData.cFileName, "..") == 0)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
AllFiles.push_back(FindFileData.cFileName);
|
AllFiles.push_back(FindFileData.cFileName);
|
||||||
} while (FindNextFileA(hFind, &FindFileData));
|
} while (FindNextFileA(hFind, &FindFileData));
|
||||||
FindClose(hFind);
|
FindClose(hFind);
|
||||||
@ -546,6 +553,13 @@ AStringVector cFile::GetFolderContents(const AString & a_Folder)
|
|||||||
struct dirent *dirp;
|
struct dirent *dirp;
|
||||||
while ((dirp = readdir(dp)) != nullptr)
|
while ((dirp = readdir(dp)) != nullptr)
|
||||||
{
|
{
|
||||||
|
if (
|
||||||
|
(strcmp(dirp->d_name, ".") == 0) ||
|
||||||
|
(strcmp(dirp->d_name, "..") == 0)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
AllFiles.push_back(dirp->d_name);
|
AllFiles.push_back(dirp->d_name);
|
||||||
}
|
}
|
||||||
closedir(dp);
|
closedir(dp);
|
||||||
|
Loading…
Reference in New Issue
Block a user