Lime3DS/src/android
JosJuice 3f4b57635e
android: Use case insensitivity in DocumentsTree (#7115)
* 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.
2023-11-07 11:46:25 -08:00
..
app android: Use case insensitivity in DocumentsTree (#7115) 2023-11-07 11:46:25 -08:00
gradle/wrapper android: Bump to gradle 8.0 2023-06-12 18:39:42 +05:30
.gitignore Android: Java + JNI dump 2022-04-14 20:44:57 +05:30
build.gradle.kts Android: Gradle updates (#6653) 2023-07-02 01:08:27 -07:00
code-style-java.xml Android: Java + JNI dump 2022-04-14 20:44:57 +05:30
gradle.properties android: Bump to gradle 8.0 2023-06-12 18:39:42 +05:30
gradlew android: upgrade SDK and NDK versions (#6152) 2022-10-07 20:09:12 +05:30
gradlew.bat android: add build files 2018-11-13 19:54:32 -06:00
settings.gradle.kts Android: Gradle updates (#6653) 2023-07-02 01:08:27 -07:00