diff options
author | bunnei <bunneidev@gmail.com> | 2023-06-23 06:46:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-23 06:46:50 +0200 |
commit | 3f3e4efb30de021fed52badc34808008276db9e7 (patch) | |
tree | 14462b7b13e1ba9f978667f6f2586d6a3fe5df50 /src/core/file_sys/patch_manager.cpp | |
parent | Merge pull request #10794 from 8bitDream/multiples (diff) | |
parent | vfs_real: ensure size cache is reset on write (diff) | |
download | yuzu-3f3e4efb30de021fed52badc34808008276db9e7.tar yuzu-3f3e4efb30de021fed52badc34808008276db9e7.tar.gz yuzu-3f3e4efb30de021fed52badc34808008276db9e7.tar.bz2 yuzu-3f3e4efb30de021fed52badc34808008276db9e7.tar.lz yuzu-3f3e4efb30de021fed52badc34808008276db9e7.tar.xz yuzu-3f3e4efb30de021fed52badc34808008276db9e7.tar.zst yuzu-3f3e4efb30de021fed52badc34808008276db9e7.zip |
Diffstat (limited to 'src/core/file_sys/patch_manager.cpp')
-rw-r--r-- | src/core/file_sys/patch_manager.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp index 4e61d4335..d3286b352 100644 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp @@ -153,7 +153,7 @@ VirtualDir PatchManager::PatchExeFS(VirtualDir exefs) const { const auto sdmc_load_dir = fs_controller.GetSDMCModificationLoadRoot(title_id); std::vector<VirtualDir> patch_dirs = {sdmc_load_dir}; - if (load_dir != nullptr && load_dir->GetSize() > 0) { + if (load_dir != nullptr) { const auto load_patch_dirs = load_dir->GetSubdirectories(); patch_dirs.insert(patch_dirs.end(), load_patch_dirs.begin(), load_patch_dirs.end()); } @@ -354,8 +354,7 @@ static void ApplyLayeredFS(VirtualFile& romfs, u64 title_id, ContentRecordType t const auto load_dir = fs_controller.GetModificationLoadRoot(title_id); const auto sdmc_load_dir = fs_controller.GetSDMCModificationLoadRoot(title_id); if ((type != ContentRecordType::Program && type != ContentRecordType::Data) || - ((load_dir == nullptr || load_dir->GetSize() <= 0) && - (sdmc_load_dir == nullptr || sdmc_load_dir->GetSize() <= 0))) { + (load_dir == nullptr && sdmc_load_dir == nullptr)) { return; } @@ -496,7 +495,7 @@ PatchManager::PatchVersionNames PatchManager::GetPatchVersionNames(VirtualFile u // General Mods (LayeredFS and IPS) const auto mod_dir = fs_controller.GetModificationLoadRoot(title_id); - if (mod_dir != nullptr && mod_dir->GetSize() > 0) { + if (mod_dir != nullptr) { for (const auto& mod : mod_dir->GetSubdirectories()) { std::string types; @@ -540,7 +539,7 @@ PatchManager::PatchVersionNames PatchManager::GetPatchVersionNames(VirtualFile u // SDMC mod directory (RomFS LayeredFS) const auto sdmc_mod_dir = fs_controller.GetSDMCModificationLoadRoot(title_id); - if (sdmc_mod_dir != nullptr && sdmc_mod_dir->GetSize() > 0) { + if (sdmc_mod_dir != nullptr) { std::string types; if (IsDirValidAndNonEmpty(FindSubdirectoryCaseless(sdmc_mod_dir, "exefs"))) { AppendCommaIfNotEmpty(types, "LayeredExeFS"); |