Open saket opened 10 months ago
AndroidFileSystem uses Locale.getDefault() for lowercasing file extensions. Wouldn't this generate different results on different locales? Should modernstorage use Locale.ENGLISH instead?
AndroidFileSystem
Locale.getDefault()
modernstorage
Locale.ENGLISH
https://github.com/google/modernstorage/blob/74ffdae8638bf36930dcda3ad650da8a8c868522/storage/src/main/java/com/google/modernstorage/storage/AndroidFileSystem.kt#L206
Turns out MimeTypeMap is already calling String#toLowerCase(Locale.ROOT) internally. I'm assuming modernstorage does not need to do it again.
MimeTypeMap
String#toLowerCase(Locale.ROOT)
AndroidFileSystem
usesLocale.getDefault()
for lowercasing file extensions. Wouldn't this generate different results on different locales? Shouldmodernstorage
useLocale.ENGLISH
instead?https://github.com/google/modernstorage/blob/74ffdae8638bf36930dcda3ad650da8a8c868522/storage/src/main/java/com/google/modernstorage/storage/AndroidFileSystem.kt#L206