You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is currently impossible to select any of the disk drives when trying to import or scan projects in the project manager.
Steps to reproduce
On a Windows computer with multiple drives
open the Godot project manager and click import or Scan
try to select any of the drives listed in the dropdown menu
observe how the drive isn't selected and the list of folders and files doesn't update
Current workaround: Enter the path directly into the text field next to the dropdown menu.
Minimal reproduction project (MRP)
No MRP needed, but the culprit is likely #91902, so 4.3 is not affected. I didn't bisect, but looking at the changes introduced in that PR, this is what's happening:
When a drive is selected, DirAccessWindows::fix_path checks if the drive path, for example D: is a relative path. If yes, it's appended to the current path.
D:, as well as C: and any other drive is recognized as a relative path because String::is_relative_path only checks for the :/ and :\patterns, but not a single colon, like in D:.
This causes the drive letter to be appended to the current directory, which of course doesn't exist, which causes the function to change the current path to fail.
The text was updated successfully, but these errors were encountered:
I would supply a fix myself, but I don't know what the correct way forward is. A simple solution would be to just change the text in the dropdown menu from DRIVE_LETTER: to DRIVE_LETTER:\, but that sounds hacky and might introduce bugs elsewhere. Slightly more correct solutions may be that a path is recognized as an absolute path if it ends with a colon (of course only on windows) or if it is exactly two characters long and the second one is a colon.
Shouldn't there be Microsoft specs somewhere that define exactly what a valid path is composed of?
Edit: I found some Microsoft specs here and here. From these it's pretty clear that C: is, in fact, not a valid absolute path and should probably not be treated as such. So the code in String::is_relative_path should probably be left as it is.
Tested versions
v4.4.dev.custom_build [fd7239c]
System information
Windows 10, GeForce RTX 3070, Vulkan
Issue description
It is currently impossible to select any of the disk drives when trying to import or scan projects in the project manager.
Steps to reproduce
On a Windows computer with multiple drives
Current workaround: Enter the path directly into the text field next to the dropdown menu.
Minimal reproduction project (MRP)
No MRP needed, but the culprit is likely #91902, so 4.3 is not affected. I didn't bisect, but looking at the changes introduced in that PR, this is what's happening:
DirAccessWindows::fix_path
checks if the drive path, for exampleD:
is a relative path. If yes, it's appended to the current path.D:
, as well asC:
and any other drive is recognized as a relative path becauseString::is_relative_path
only checks for the:/
and:\
patterns, but not a single colon, like inD:
.The text was updated successfully, but these errors were encountered: