X Tutup
Skip to content

Fix FileDialog's root_subfolder on Windows#110524

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
paul-marechal:filedialog-windows-fix
Nov 13, 2025
Merged

Fix FileDialog's root_subfolder on Windows#110524
Repiteo merged 1 commit intogodotengine:masterfrom
paul-marechal:filedialog-windows-fix

Conversation

@paul-marechal
Copy link
Contributor

root_prefix either contains an empty string or the current root including the drive letter. This means that the previous logic would never ever match since dir_access->get_current_dir(false) explicitly excludes the drive letter.

This change removes this boolean parameter so we compare paths in a way that can match.

I've had a look at the implementations for other platforms for DirAccess::get_current_dir(bool include_drive) and outside Windows none seem to consider the include_drive parameter which makes me believe that this change won't break other platforms.

Fixes #79513

@paul-marechal paul-marechal requested a review from a team as a code owner September 14, 2025 22:31
@KoBeWi KoBeWi added this to the 4.6 milestone Sep 14, 2025
@fire fire changed the title file_dialog: fix root_subfolder on Windows Fix file_dialog's root_subfolder on Windows Sep 15, 2025
@Repiteo
Copy link
Contributor

Repiteo commented Oct 1, 2025

Could you squash your commits? See our pull request guidelines for more information

`root_prefix` either contains an empty string or the current root
including the drive letter. This means that the previous logic would
never ever match since `dir_access->get_current_dir(false)` explicitly
excludes the drive letter.

This change removes this boolean parameter so we compare paths in a way
that can match.

I've had a look at the implementations for other platforms for
`DirAccess::get_current_dir(bool include_drive)` and outside Windows
none seem to consider the `include_drive` parameter which makes me
believe that this change won't break other platforms.
@paul-marechal paul-marechal force-pushed the filedialog-windows-fix branch from b90aaf2 to 375f88d Compare October 3, 2025 18:46
@paul-marechal
Copy link
Contributor Author

In case me pushing the squashed commit didn't notify you: the change should now be ready to merge

@Repiteo Repiteo merged commit 3cc90cd into godotengine:master Nov 13, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 13, 2025

Thanks!

@paul-marechal paul-marechal deleted the filedialog-windows-fix branch November 14, 2025 06:15
@akien-mga akien-mga changed the title Fix file_dialog's root_subfolder on Windows Fix file_dialog's root_subfolder on Windows Jan 25, 2026
@akien-mga akien-mga changed the title Fix file_dialog's root_subfolder on Windows Fix FileDialog's root_subfolder on Windows Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't enter subfolders of a FileDialog's root_subfolder when access is set to ACCESS_FILESYSTEM.

3 participants

X Tutup