mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
Avoid trying to create a FileLoader for empty filenames
Assorted cleanup
This commit is contained in:
@@ -154,6 +154,10 @@ DirectoryFileSystem::DirectoryFileSystem(IHandleAllocator *_hAlloc, std::string
|
||||
hAlloc = _hAlloc;
|
||||
}
|
||||
|
||||
DirectoryFileSystem::~DirectoryFileSystem() {
|
||||
CloseAll();
|
||||
}
|
||||
|
||||
std::string DirectoryFileHandle::GetLocalPath(std::string& basePath, std::string localpath)
|
||||
{
|
||||
if (localpath.empty())
|
||||
@@ -445,16 +449,12 @@ void DirectoryFileHandle::Close()
|
||||
|
||||
void DirectoryFileSystem::CloseAll() {
|
||||
for (auto iter = entries.begin(); iter != entries.end(); ++iter) {
|
||||
INFO_LOG(FILESYS, "DirectoryFileSystem::CloseAll(): Force closing %d (%s)", (int)iter->first, iter->second.guestFilename.c_str());
|
||||
iter->second.hFile.Close();
|
||||
}
|
||||
|
||||
entries.clear();
|
||||
}
|
||||
|
||||
DirectoryFileSystem::~DirectoryFileSystem() {
|
||||
CloseAll();
|
||||
}
|
||||
|
||||
std::string DirectoryFileSystem::GetLocalPath(std::string localpath) {
|
||||
if (localpath.empty())
|
||||
return basePath;
|
||||
|
||||
Reference in New Issue
Block a user