Merge pull request #110524 from paul-marechal/filedialog-windows-fix
Fix file_dialog's root_subfolder on Windows
This commit is contained in:
@ -1573,7 +1573,7 @@ void FileDialog::_change_dir(const String &p_new_dir) {
|
|||||||
} else {
|
} else {
|
||||||
String old_dir = dir_access->get_current_dir();
|
String old_dir = dir_access->get_current_dir();
|
||||||
dir_access->change_dir(p_new_dir);
|
dir_access->change_dir(p_new_dir);
|
||||||
if (!dir_access->get_current_dir(false).begins_with(root_prefix)) {
|
if (!dir_access->get_current_dir().begins_with(root_prefix)) {
|
||||||
dir_access->change_dir(old_dir);
|
dir_access->change_dir(old_dir);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user