Skip to content

Commit

Permalink
check rom file is valid or not
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishan09811 authored Feb 10, 2024
1 parent b256c89 commit 9a70060
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public void onResume() {
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();
Expand Down

0 comments on commit 9a70060

Please sign in to comment.