Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'FileDialog' always has the first driver selected no matter what #30872

Closed
YeldhamDev opened this issue Jul 27, 2019 · 2 comments
Closed

'FileDialog' always has the first driver selected no matter what #30872

YeldhamDev opened this issue Jul 27, 2019 · 2 comments
Milestone

Comments

@YeldhamDev
Copy link
Member

YeldhamDev commented Jul 27, 2019

Godot version:
6c9ccf1

OS/device including version:
GNU/Linux at least.

Issue description:
In the FileDialog, when selecting one of the drivers (which in here are the folders in "Places"), while correctly going to the location, it will still have the first one selected:
Screenshot_20190727_124525

From the little digging I did, this is because DirAccess::get_current_drive() only checks if the beginning of the paths is equal to get its results. And since all of them start with "/home/[user]", it just always returns the first one.

Also, shouldn't "/home/[user]" be hidden to begin with? As otherwise it would lead to the dialog expanding drastically from drivers with big names.

@Calinou
Copy link
Member

Calinou commented Jul 28, 2020

Also, shouldn't "/home/[user]" be hidden to begin with? As otherwise it would lead to the dialog expanding drastically from drivers with big names.

Sounds good to me, but we should replace "/home/[user]" with "Home" if there's nothing after "/home/[user]". Also, paths that don't start with "/home/[user]" should be left as-is (to distinguish different mount points).

@follower Sorry, I accidentally removed your comment instead of removing mine... 😶

@YeldhamDev
Copy link
Member Author

This appears to be fixed in master.

@YeldhamDev YeldhamDev added this to the 4.0 milestone Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants