mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-26 22:02:15 +00:00
fs.mitm: Fix romfs detection on SD
This commit is contained in:
parent
e786bc7e9a
commit
5d0aabaa44
1 changed files with 8 additions and 0 deletions
|
@ -202,6 +202,14 @@ Result Utils::OpenRomFSDir(FsFileSystem *fs, u64 title_id, const char *path, FsD
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Utils::HasSdRomfsContent(u64 title_id) {
|
bool Utils::HasSdRomfsContent(u64 title_id) {
|
||||||
|
/* Check for romfs.bin. */
|
||||||
|
FsFile data_file;
|
||||||
|
if (R_SUCCEEDED(Utils::OpenSdFileForAtmosphere(title_id, "romfs.bin", FS_OPEN_READ, &data_file))) {
|
||||||
|
fsFileClose(&data_file);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check for romfs folder with non-zero content. */
|
||||||
FsDir dir;
|
FsDir dir;
|
||||||
if (R_FAILED(Utils::OpenRomFSSdDir(title_id, "", &dir))) {
|
if (R_FAILED(Utils::OpenRomFSSdDir(title_id, "", &dir))) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue