mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
QuotePlugin: Fixed handle leak
This commit is contained in:
parent
a8dda05447
commit
1ba617d829
@ -77,10 +77,10 @@ void ScanFolder(std::vector<std::wstring>& files, std::vector<std::wstring>& fil
|
||||
std::wstring searchPath = path + L"*";
|
||||
|
||||
hSearch = FindFirstFile(searchPath.c_str(), &fileData);
|
||||
if (hSearch == INVALID_HANDLE_VALUE) return; // No more files found
|
||||
|
||||
do
|
||||
{
|
||||
if (hSearch == INVALID_HANDLE_VALUE) break; // No more files found
|
||||
|
||||
if (fileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
{
|
||||
if (bSubfolders &&
|
||||
@ -110,6 +110,8 @@ void ScanFolder(std::vector<std::wstring>& files, std::vector<std::wstring>& fil
|
||||
}
|
||||
}
|
||||
while (FindNextFile(hSearch, &fileData));
|
||||
|
||||
FindClose(hSearch);
|
||||
}
|
||||
|
||||
PLUGIN_EXPORT void Initialize(void** data, void* rm)
|
||||
|
Loading…
Reference in New Issue
Block a user