mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 12:21:18 +00:00
fs.mitm: only iter romfs dir if it exists (closes #763)
This commit is contained in:
parent
f1a9dd8a98
commit
06e4b94674
1 changed files with 9 additions and 0 deletions
|
@ -239,6 +239,15 @@ namespace ams::mitm::fs {
|
||||||
R_ASSERT(fsOpenSdCardFileSystem(&sd_filesystem));
|
R_ASSERT(fsOpenSdCardFileSystem(&sd_filesystem));
|
||||||
ON_SCOPE_EXIT { fsFsClose(&sd_filesystem); };
|
ON_SCOPE_EXIT { fsFsClose(&sd_filesystem); };
|
||||||
|
|
||||||
|
/* If there is no romfs folder on the SD, don't bother continuing. */
|
||||||
|
{
|
||||||
|
FsDir dir;
|
||||||
|
if (R_FAILED(mitm::fs::OpenAtmosphereRomfsDirectory(&dir, this->program_id, this->root->path.get(), OpenDirectoryMode_Directory, &sd_filesystem))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fsDirClose(&dir);
|
||||||
|
}
|
||||||
|
|
||||||
this->cur_source_type = DataSourceType::LooseSdFile;
|
this->cur_source_type = DataSourceType::LooseSdFile;
|
||||||
this->VisitDirectory(&sd_filesystem, this->root);
|
this->VisitDirectory(&sd_filesystem, this->root);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue