diff --git a/Core/FileSystems/DirectoryFileSystem.cpp b/Core/FileSystems/DirectoryFileSystem.cpp index 80668f3cd6..9586d1f580 100644 --- a/Core/FileSystems/DirectoryFileSystem.cpp +++ b/Core/FileSystems/DirectoryFileSystem.cpp @@ -669,6 +669,7 @@ std::vector DirectoryFileSystem::GetDirListing(std::string path) { if (!retval) break; } + FindClose(hFind); #else dirent *dirp; std::string localPath = GetLocalPath(path); diff --git a/Core/FileSystems/VirtualDiscFileSystem.cpp b/Core/FileSystems/VirtualDiscFileSystem.cpp index 84974436ac..75da23a191 100644 --- a/Core/FileSystems/VirtualDiscFileSystem.cpp +++ b/Core/FileSystems/VirtualDiscFileSystem.cpp @@ -644,6 +644,7 @@ std::vector VirtualDiscFileSystem::GetDirListing(std::string path) entry.startSector = fileList[fileIndex].firstBlock; myVector.push_back(entry); } + FindClose(hFind); #else dirent *dirp; std::string localPath = GetLocalPath(path);