Skip to content
Snippets Groups Projects
Commit 47de6884 authored by D-AIRY's avatar D-AIRY
Browse files

Fixed level enum on empty dir

parent f6661934
Branches
Tags
No related merge requests found
......@@ -221,12 +221,19 @@ SX_LIB_API BOOL SLevel_EnumLevels(CLevelInfo *pInfo)
while(!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || (!strcmp(fd.cFileName, ".") || !strcmp(fd.cFileName, "..")))
{
bFound = false;
if(::FindNextFile(pInfo->m_hFind, &fd) && (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && strcmp(fd.cFileName, ".") && strcmp(fd.cFileName, ".."))
if(::FindNextFile(pInfo->m_hFind, &fd))
{
if((fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && strcmp(fd.cFileName, ".") && strcmp(fd.cFileName, ".."))
{
bFound = true;
break;
}
}
else
{
break;
}
}
}
if(!bFound)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment