mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-21 18:29:05 +02:00
Merge pull request #14651 from hrydgard/fix-mount-bug
Fix silly filesystem mounting bug introduced in #14638
This commit is contained in:
3 files changed
+16
-1
No files matched your search
@@ -298,6 +298,15 @@ void MetaFileSystem::UnmountAll() {
|
||||
currentDir.clear();
|
||||
}
|
||||
|
||||
void MetaFileSystem::Unmount(std::string prefix) {
|
||||
for (auto iter = fileSystems.begin(); iter != fileSystems.end(); iter++) {
|
||||
if (iter->prefix == prefix) {
|
||||
fileSystems.erase(iter);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool MetaFileSystem::Remount(std::string prefix, std::shared_ptr<IFileSystem> system) {
|
||||
std::lock_guard<std::recursive_mutex> guard(lock);
|
||||
for (auto &it : fileSystems) {
|
||||
|
||||
@@ -62,6 +62,7 @@ public:
|
||||
bool Remount(std::string prefix, std::shared_ptr<IFileSystem> system);
|
||||
|
||||
void UnmountAll();
|
||||
void Unmount(std::string prefix);
|
||||
|
||||
// The pointer returned from these are for temporary usage only. Do not store.
|
||||
IFileSystem *GetSystem(const std::string &prefix);
|
||||
|
||||
+6
-1
@@ -775,7 +775,12 @@ void __IoShutdown() {
|
||||
}
|
||||
asyncDefaultPriority = -1;
|
||||
|
||||
pspFileSystem.UnmountAll();
|
||||
pspFileSystem.Unmount("ms0:");
|
||||
pspFileSystem.Unmount("fatms0:");
|
||||
pspFileSystem.Unmount("fatms:");
|
||||
pspFileSystem.Unmount("pfat0:");
|
||||
pspFileSystem.Unmount("flash0:");
|
||||
pspFileSystem.Unmount("exdata0:");
|
||||
|
||||
MemoryStick_Shutdown();
|
||||
memStickCallbacks.clear();
|
||||
|
||||
Reference in new issue
Block a user