mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 19:44:58 +00:00
check rom file is valid or not
This commit is contained in:
parent
b256c89e23
commit
9a70060644
1 changed files with 4 additions and 0 deletions
|
@ -48,6 +48,10 @@ public class GamesFragment extends Fragment implements ActivityResultCallback<Ur
|
|||
public void onActivityResult(Uri result) {
|
||||
if (result != null) {
|
||||
String uri = result.toString();
|
||||
if (!uri.endsWith(".3ds") && !uri.endsWith(".cia")) {
|
||||
Toast.makeText(getContext(), "Invalid ROM file", Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
if (GameUtils.findByRomPath(uri) == null) {
|
||||
if (FileUtils.obtainRealPath(uri) == null) {
|
||||
Toast.makeText(getContext(), "Invalid file path", Toast.LENGTH_LONG).show();
|
||||
|
|
Loading…
Add table
Reference in a new issue