mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-27 01:22:37 -06:00
3f4b57635e
* android: Unify DocumentNode's `key` and `name` They're effectively the same data, just obtained in different ways. * android: Remove getFilenameWithExtensions method After the previous commit, there's only one remaining use of getFilenameWithExtensions. Let's get rid of that one in favor of DocumentFile.getName so we no longer need to do manual URI parsing. * android: Use case insensitivity in DocumentsTree External storage on Android is case insensitive. This is still the case when accessing it through SAF. (Of course, SAF makes no guarantees about whether the storage location picked by the user is backed by external storage or whether it's case insensitive, but I'm just going to ignore that for now because I am *so tired of SAF*) Because the underlying file system is case insensitive, Citra's caching layer that had to be implemented because SAF's performance is atrocious also needs to be case insensitive. Otherwise, we get a problem in the following scenario: 1. Citra wants to check if a particular folder exists in sdmc, and if not, create it. 2. The folder does exist, but it has a different capitalization than Citra expects, due to a mismatch between Citra's code and (typically) files dumped from a real 3DS using ThreeSD. 3. Citra tries to open the folder, but DocumentsTree fails to find it, because the case doesn't match. 4. Citra then tries to create the folder, but creating the folder fails, because the underlying filesystem considers the folder to exist. 5. The game fails to start. (Sorry, did I say creating the folder fails? Actually, a new folder does get created, with " (1)" appended to the end of the name. SAF makes no guarantees whatsoever about what happens in this situation – it's all determined by the storage provider!) This commit makes the caching layer case insensitive so that the described scenario will work better. |
||
---|---|---|
.. | ||
app | ||
gradle/wrapper | ||
.gitignore | ||
build.gradle.kts | ||
code-style-java.xml | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
settings.gradle.kts |