mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-27 01:15:29 +03:00
Make TitleId check more robust
This commit is contained in:
parent
a634bca2d2
commit
b24bf9eb91
@ -59,7 +59,7 @@ class AppDialog : BottomSheetDialogFragment() {
|
|||||||
private val savesFolderRoot by lazy { "${requireContext().getPublicFilesDir().canonicalPath}/switch/nand/user/save/0000000000000000/00000000000000000000000000000001/" }
|
private val savesFolderRoot by lazy { "${requireContext().getPublicFilesDir().canonicalPath}/switch/nand/user/save/0000000000000000/00000000000000000000000000000001/" }
|
||||||
private val documentPicker = registerForActivityResult(ActivityResultContracts.OpenDocument()) {
|
private val documentPicker = registerForActivityResult(ActivityResultContracts.OpenDocument()) {
|
||||||
it?.let { uri ->
|
it?.let { uri ->
|
||||||
if (uri.toString().contains(item.titleId as CharSequence)) {
|
if (uri.toString().takeLast(20).removeSuffix(".zip") == item.titleId) {
|
||||||
val saveFolder = File(savesFolderRoot + item.titleId)
|
val saveFolder = File(savesFolderRoot + item.titleId)
|
||||||
val inputZip = requireContext().contentResolver.openInputStream(uri)
|
val inputZip = requireContext().contentResolver.openInputStream(uri)
|
||||||
if (inputZip != null) {
|
if (inputZip != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user