aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-30 10:48:59 -0400
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-30 11:10:36 -0400
commitc96d1e01931f947e43a12aefeb0de0883f04aeba (patch)
treed69a921918823b017ae865e60821a8575113005a /src/core/file_sys
parent24e3cb462e47b22edda334939123694ff6920e95 (diff)
file_sys: don't format a null name for an unknown system archive
SynthesizeSystemArchive logged the archive's name before checking it was one it knows: for any other data id the name is null, fmt throws, nothing catches it and the process ends (Nintendo Switch Sports Resort, ~10 s in, from fsp OpenDataStorageByDataId). Return no archive with a warning, so OpenDataStorageByDataId fails the request as before.
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/system_archive/system_archive.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/file_sys/system_archive/system_archive.cpp b/src/core/file_sys/system_archive/system_archive.cpp
index 1743d01b12..d47332a9d0 100644
--- a/src/core/file_sys/system_archive/system_archive.cpp
+++ b/src/core/file_sys/system_archive/system_archive.cpp
@@ -76,6 +76,11 @@ constexpr inline SystemArchiveDescriptor GetSystemArchive(u64 title_id) {
VirtualFile SynthesizeSystemArchive(const u64 title_id) {
auto const desc = GetSystemArchive(title_id);
+ if (desc.name == nullptr) {
+ // Not a system archive Eden knows (fmt throws on a null string, ending the process).
+ LOG_WARNING(Service_FS, "No system archive {:#016x} to synthesize", title_id);
+ return nullptr;
+ }
LOG_INFO(Service_FS, "Synthesizing system archive '{}' ({:#016x}).", desc.name, title_id);
if (desc.supplier != nullptr) {
if (auto const dir = desc.supplier(); dir != nullptr) {