diff options
author | Ac_K <Acoustik666@gmail.com> | 2023-05-05 23:24:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-05 21:24:35 +0000 |
commit | d6698680bef4ac37b63d67c5415edf5717a84b3a (patch) | |
tree | b442adb7e1e5704705d5c6303d59fdb9ce23bbee /src/Ryujinx.Ava/Common/ApplicationHelper.cs | |
parent | e5c9838b0bb8e53c9802c8d33d3b46843737f2f2 (diff) |
UI: Fix sections extraction (#4820)1.1.759
* UI: Fix sections extraction
There is currently an issue when the update NCA doesn't contains the section we want to extract, this is fixed by adding a check.
I have fixed the inverted handler of ExeFs/Logo introduced in #4755.
Fixes #4521
* Addresses feedback
Diffstat (limited to 'src/Ryujinx.Ava/Common/ApplicationHelper.cs')
-rw-r--r-- | src/Ryujinx.Ava/Common/ApplicationHelper.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Ryujinx.Ava/Common/ApplicationHelper.cs b/src/Ryujinx.Ava/Common/ApplicationHelper.cs index 8c36a636..c961d76c 100644 --- a/src/Ryujinx.Ava/Common/ApplicationHelper.cs +++ b/src/Ryujinx.Ava/Common/ApplicationHelper.cs @@ -233,9 +233,14 @@ namespace Ryujinx.Ava.Common try { - IFileSystem ncaFileSystem = patchNca != null - ? mainNca.OpenFileSystemWithPatch(patchNca, index, IntegrityCheckLevel.ErrorOnInvalid) - : mainNca.OpenFileSystem(index, IntegrityCheckLevel.ErrorOnInvalid); + bool sectionExistsInPatch = false; + if (patchNca != null) + { + sectionExistsInPatch = patchNca.CanOpenSection(index); + } + + IFileSystem ncaFileSystem = sectionExistsInPatch ? mainNca.OpenFileSystemWithPatch(patchNca, index, IntegrityCheckLevel.ErrorOnInvalid) + : mainNca.OpenFileSystem(index, IntegrityCheckLevel.ErrorOnInvalid); FileSystemClient fsClient = _horizonClient.Fs; |