mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-31 06:48:22 -04:00
fs.mitm: Try to MitM titles that have override RomFS content on the SD card
This commit is contained in:
parent
2a6348cd73
commit
5993614c2e
3 changed files with 25 additions and 1 deletions
|
@ -121,3 +121,19 @@ Result Utils::OpenRomFSDir(FsFileSystem *fs, u64 title_id, const char *path, FsD
|
|||
}
|
||||
return fsFsOpenDirectory(fs, safe_path, FS_DIROPEN_DIRECTORY | FS_DIROPEN_FILE, out);
|
||||
}
|
||||
|
||||
Result Utils::HasSdRomfsContent(u64 title_id, bool *out) {
|
||||
Result rc;
|
||||
FsDir dir;
|
||||
if (R_FAILED((rc = Utils::OpenRomFSSdDir(title_id, "", &dir)))) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
FsDirectoryEntry dir_entry;
|
||||
u64 read_entries;
|
||||
if (R_SUCCEEDED((rc = fsDirRead(&dir, 0, &read_entries, 1, &dir_entry)))) {
|
||||
*out = (read_entries == 1);
|
||||
}
|
||||
fsDirClose(&dir);
|
||||
return rc;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue