Merge pull request #14651 from hrydgard/fix-mount-bug

Fix silly filesystem mounting bug introduced in #14638
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2021-07-27 23:34:08 +02:00
commit 74ffcfdcb8
3 files changed
+16 -1

No files matched your search

+9
View File
@@ -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) {
+1
View File
@@ -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
View File
@@ -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();