You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 18:41:20 +00:00
Fix changing directory in FileDialog
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user