Commit 47de6884 authored by D-AIRY's avatar D-AIRY

Fixed level enum on empty dir

parent f6661934
......@@ -221,9 +221,16 @@ 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
{
bFound = true;
break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment