From 07c709bb4b04023ad90f192c140335812282b003 Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 19 Dec 2025 02:38:25 +0100 Subject: [PATCH] Fix changing directory in FileDialog --- scene/gui/file_dialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index 3a365092896..57bc7a2d6e9 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -1284,6 +1284,9 @@ String FileDialog::get_current_path() const { } void FileDialog::set_current_dir(const String &p_dir) { + if (p_dir.is_relative_path()) { + dir_access->change_dir(OS::get_singleton()->get_resource_dir()); + } _change_dir(p_dir); _push_history(); @@ -1587,9 +1590,6 @@ void FileDialog::_select_drive(int p_idx) { } void FileDialog::_change_dir(const String &p_new_dir) { - if (p_new_dir.is_relative_path()) { - dir_access->change_dir(OS::get_singleton()->get_resource_dir()); - } if (root_prefix.is_empty()) { dir_access->change_dir(p_new_dir); } else {