Apply a hack to simulate USB created files #9799
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #9794. Some homebrew accidentally depend on a PSP firmware bug. It happens to be the same flaw Windows 98 has, for exactly the same reason.
Since I was moving it away from affecting case-sensitive ISO filesystems, I tested quickly to verify it's the same Windows 98 bug (as described in #9793) and made it follow the basename/extension logic correctly. I could see some homebrew also mishandling "data.BIN" (which NT/XP/7/8/10/etc. would write as "DATA.BIN + lowercase basename flag".)
Note that the PSP also doesn't write this flag. The danger here would be:
But note that the savedata code skips files that are not all uppercase in FILES, and almost all games write uppercase. So hopefully the above scenario is very unlikely.
Otherwise we'd have to track lowercase filenames written since game start, or something. Or just only apply this hack when running homebrew.
-[Unknown]