Closed i30817 closed 3 weeks ago
Can you check what happens if you:
/storage/emulated/0/Retroarch/system (well it appears as \<default> after pressing c without reloading and if you try to add a game without reloading the core right away it selects / as its default for some bug - restarting right away instead of trying to add games fixes that).
Ok, this part has been a little bit reworked, now if last browsed path
points to a not existing or not readable folder, it will default after applying the settings to retroarch system path, no need to reload the core.
All paths are tested at core startup, and removed if not existing or not readable.
You can test current master (f6ff9f3d6ff9334f469513daaaa97f6a4c85ca69)
Seems like it worked (I didn't build, just updated the core in the RA android menu).
However you can still get trapped in the file browser browser until you restart (assuming you don't know about the reset button for the last directory in the global options). Scummvm will change the default dir if you try to add a game in a unreadable dir, and you won't be able to navigate out because even cancelling or failing adding a game that way doesn't prevent the last directory being used in the file browser widget if you open it again without restarting (restarting puts it in the RA system dir again because it's nonexisting\nonreadable, the code you added I'm assuming).
Really what's needed is the go up button in upstream to be grayed out in the file browser widget if you can't read the parent directory, and the direct entry field to revert to the previous valid dir if entering the path directly fails with a non-existing or non readable dir too.
The widget seems to assume that every filesystem will follow Linux distros rules where if you're on a directory, you also have always at least read only access to the parent, which is not the case for android.
Good point, you can test latest master @ d7276b9e6b4baa25e69ebf67b60870b11b768cf5. Besides the tests described above, browser now will not go to the parent path if not readable, and will not accept a not existing or not readable path, even if typed in by hand. In this case it will take the last valid path selected (e.g. the last valid folder selected while browsing, no way to change this behaviour core-side). Now it should be not possible to get stuck in a dead end.
Works now, core is 50% more usable now without the trap for new users.
When you try to add or mass add games (a requirement to create the playlists correctly), in android you're faced with a browser with a single / dash, and no visible files to navigate. As you can't navigate most users will be stuck unless they know they can navigate to a user visible folder all at once using the onscreen keyboard function (usually /storage/emulated/0/ ).
The code seems to assume that the root is a fallback to navigate the filesystem. But the root isn't readable in android, either that or the core remembers the last used dir and it allowed me to navigate up to a unnavigable dir.
Anyway, please make the default dir here something readable in the place android reserves for the user. Forbidding the user from getting stuck in a technically existing, but actually unnavigable dir would also be nice (I don't know if the core remembers like scummvm but that is a danger if the user keeps pressing up and then restarts the core once they realize they can't navigate and the core puts the browser again in a unnavigable dir).
It would also be nice if the default screen also had the code that upstream scummvm has in the root (as a line (paraphrasing, don't remember) in the directory entries with \<> enclosing it \<add remote directory>) to open the Files app because the files app can use a SAF plugin (like RSAF) to add a remote directory and scan nfs or webdav (for instance).