aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys/patch_manager.cpp
diff options
context:
space:
mode:
authorZach Hilman <DarkLordZach@users.noreply.github.com>2020-04-14 16:59:25 -0400
committerGitHub <noreply@github.com>2020-04-14 16:59:25 -0400
commit2d207120538e811a4f74fe02bfff47cac03de7bc (patch)
treea6bf38b200c5ef57971e6542c22944d7f34d2e59 /src/core/file_sys/patch_manager.cpp
parentf2f2262c5e3ea25747e56cf716dfcfdc4969ab52 (diff)
parent72c1dd467d809d1d03964bc78750c6485a73b18c (diff)
Merge pull request #3661 from bunnei/patch-manager-fix
file_sys: patch_manager: Return early when there are no layers to apply.
Diffstat (limited to 'src/core/file_sys/patch_manager.cpp')
-rw-r--r--src/core/file_sys/patch_manager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp
index e226e9711f..e77e82b8d8 100644
--- a/src/core/file_sys/patch_manager.cpp
+++ b/src/core/file_sys/patch_manager.cpp
@@ -348,6 +348,12 @@ static void ApplyLayeredFS(VirtualFile& romfs, u64 title_id, ContentRecordType t
if (ext_dir != nullptr)
layers_ext.push_back(std::move(ext_dir));
}
+
+ // When there are no layers to apply, return early as there is no need to rebuild the RomFS
+ if (layers.empty() && layers_ext.empty()) {
+ return;
+ }
+
layers.push_back(std::move(extracted));
auto layered = LayeredVfsDirectory::MakeLayeredDirectory(std::move(layers));