Skip to content

[Windows] Unable to select drive in project manager import dialog #96279

Closed
@and-rad

Description

@and-rad

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

  • 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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions