f2e-spec
f2e-spec copied to clipboard
Errors in folder browser
Do you want to request a feature or report a bug?
Bug
What did you do?
Tried browsing folders in Windows 10.
What did you expect to see?
-
Browsing folders and not being able to enter unauthorized folders.
-
This is just usability but IMO, but navigation could use some improving. Either
Escape
should go one folder up and only exit the screen if on top level of the hierarchy, or maybe we should set up left and right arrows to go one folder up and down respectively. Might also be a good idea to display folders in a different color.
What did you see instead?
Folders for which I don't have permission (mostly OS shortcuts) not only show on the list, but they are clickable as folders, whereupon performous gives an iterator error, correctly saying permission denied, but then proceeds to change into the folder anyway. Not sure if this could then cause further breakage, with the game thinking it's inside a folder it doesn't actually have access to.
Output of performous --version
: (What version of Performous are you using?)
(paste your output here)
What is your environment & configuration (arguments, platform, ...)?
If applicable, please paste the log output in DEBUG level (--logLevel=DEBUG
switch)
(paste your output here)
Also linked to this ingame browser: https://github.com/performous/performous/issues/680
There are 2 workarounds:
- run performous as admin, which no one should do ;)
- Move songs from authorized folder to a folder you have access to and add the path to the config.xml.
I guess we can use: https://en.cppreference.com/w/cpp/filesystem/directory_options and skip on permission denied errors
Might be even better to rework this screen as a whole. Like in the opening of this PR stated, The user can still end up in a directory for which he doesn't have permission. A quick flash message shows the error popping up. But after that the screen remains blank. This is not a good user experience.
Ideally we want the following behavior:
- Start in $HOME folder
- Filter out all directories which gives permission errors
- This is the tricky part, as we can only determine it by going into the folder. Reading permissions/user/group is not a thing?
- Show directory tree to user
This way the user will never be able to accidentally end up in an sort of empty screen and we also did 'tackle' the permission error.