Browse Source
Merge pull request #1731 from DarkLordZach/change-dir-crash
filesystem: Clear registered union paths on factory creation
pull/15/merge
bunnei
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
6 additions and
0 deletions
-
src/core/hle/service/filesystem/filesystem.cpp
-
src/core/hle/service/filesystem/filesystem.h
|
|
|
@ -341,6 +341,10 @@ std::shared_ptr<FileSys::RegisteredCacheUnion> GetUnionContents() { |
|
|
|
return registered_cache_union; |
|
|
|
} |
|
|
|
|
|
|
|
void ClearUnionContents() { |
|
|
|
registered_cache_union = nullptr; |
|
|
|
} |
|
|
|
|
|
|
|
FileSys::RegisteredCache* GetSystemNANDContents() { |
|
|
|
LOG_TRACE(Service_FS, "Opening System NAND Contents"); |
|
|
|
|
|
|
|
@ -391,6 +395,7 @@ void CreateFactories(FileSys::VfsFilesystem& vfs, bool overwrite) { |
|
|
|
bis_factory = nullptr; |
|
|
|
save_data_factory = nullptr; |
|
|
|
sdmc_factory = nullptr; |
|
|
|
ClearUnionContents(); |
|
|
|
} |
|
|
|
|
|
|
|
auto nand_directory = vfs.OpenDirectory(FileUtil::GetUserPath(FileUtil::UserPath::NANDDir), |
|
|
|
|
|
|
|
@ -49,6 +49,7 @@ ResultVal<FileSys::VirtualDir> OpenSaveDataSpace(FileSys::SaveDataSpaceId space) |
|
|
|
ResultVal<FileSys::VirtualDir> OpenSDMC(); |
|
|
|
|
|
|
|
std::shared_ptr<FileSys::RegisteredCacheUnion> GetUnionContents(); |
|
|
|
void ClearUnionContents(); |
|
|
|
|
|
|
|
FileSys::RegisteredCache* GetSystemNANDContents(); |
|
|
|
FileSys::RegisteredCache* GetUserNANDContents(); |
|
|
|
|