Find all directories and make sure found entries are directories

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2666 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-06-22 13:44:02 +00:00
parent 63a1f7a0e3
commit 9adf1acb50
2 changed files with 19 additions and 12 deletions

View file

@ -334,9 +334,13 @@ void AddFolderFromReg(HKEY rootKey)
RegCloseKey(hKey);
}
lstrcat(buf, "\\*.");
lstrcat(buf, "\\*.*");
hSearch = FindFirstFile(buf, &FileData);
if (hSearch != INVALID_HANDLE_VALUE) do
if (hSearch != INVALID_HANDLE_VALUE)
{
do
{
if (FileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
if (*(WORD*)FileData.cFileName != *(WORD*)".")
{
@ -349,5 +353,8 @@ void AddFolderFromReg(HKEY rootKey)
(LPARAM)ExtractAssociatedIcon(g_hInstance, FileData.cFileName, (WORD*)&idx));*/
}
}
} while (FindNextFile(hSearch, &FileData));
}
} while (FindNextFile(hSearch, &FileData));
FindClose(hSearch);
}
}

Binary file not shown.