mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-25 21:54:17 +01:00
Fix regex
This commit is contained in:
parent
f85ecc23be
commit
dae5469a61
@ -74,7 +74,7 @@ class AppDialog : BottomSheetDialogFragment() {
|
|||||||
// A TitleID must be the first folder name inside the zip in order to be considered valid.
|
// A TitleID must be the first folder name inside the zip in order to be considered valid.
|
||||||
if (inputZip != null) {
|
if (inputZip != null) {
|
||||||
ZipInputStream(BufferedInputStream(inputZip)).use { zis ->
|
ZipInputStream(BufferedInputStream(inputZip)).use { zis ->
|
||||||
validZip = Regex("^0100[0-9A-Fa-f]{12}/\$").matches(zis.nextEntry.name)
|
validZip = Regex("^0100[0-9A-Fa-f]{12}/").containsMatchIn(zis.nextEntry.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
inputZip = requireContext().contentResolver.openInputStream(uri)
|
inputZip = requireContext().contentResolver.openInputStream(uri)
|
||||||
@ -85,6 +85,7 @@ class AppDialog : BottomSheetDialogFragment() {
|
|||||||
val isSaveFileOfThisGame = File("$savesFolderRoot${item.titleId}").exists()
|
val isSaveFileOfThisGame = File("$savesFolderRoot${item.titleId}").exists()
|
||||||
binding.deleteSave.isEnabled = isSaveFileOfThisGame
|
binding.deleteSave.isEnabled = isSaveFileOfThisGame
|
||||||
binding.exportSave.isEnabled = isSaveFileOfThisGame
|
binding.exportSave.isEnabled = isSaveFileOfThisGame
|
||||||
|
Snackbar.make(binding.root, "The save file was imported successfully", Snackbar.LENGTH_LONG).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user