ncm: work around change in Nintendo save handling behavior
Static save files do not require an entry in the save data indexer to mount.
Prior to 17.0.0, save data files were considered static if userid was 0.
In 17.0.0+, only 8000000000000000 is static.

However, some users using cfw do not have an entry for 8000000000000120 in the indexer,
for various reasons (but mostly manual nand-restore, I think). Thus, on boot of 17.0.0+,
FS will say 8000000000000120 is not present (not in indexer), and NCM will create it anew.

The 8000000000000120 save will then be empty, and then the firmware can't boot.

To workaround this, logic has been re-enabled on 17.0.0+ for building the content meta database.
Thus, if the user encounters this error, the 8000000000000120 save will be emptied, but then
it will be automatically reconstructed, fixing the problem.
1 parent 2ec3e14 commit 02e987819bf0dd0671055a15efb754cb967ab774
@Michael Scire Michael Scire authored on 12 Oct 2023
SciresM committed on 12 Oct 2023
Showing 2 changed files
View
libraries/libstratosphere/source/ncm/ncm_content_manager_impl.cpp
View
stratosphere/ncm/source/ncm_main.cpp