mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Android: Make the handling of SAF open modes more robust
This commit is contained in:
@ -17,7 +17,9 @@ public class ContentHandler
|
||||
return DolphinApplication.getAppContext().getContentResolver()
|
||||
.openFileDescriptor(Uri.parse(uri), mode).detachFd();
|
||||
}
|
||||
catch (FileNotFoundException | NullPointerException e)
|
||||
// Some content providers throw IllegalArgumentException for invalid modes,
|
||||
// despite the documentation saying that invalid modes result in a FileNotFoundException
|
||||
catch (FileNotFoundException | IllegalArgumentException | NullPointerException e)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user