summaryrefslogtreecommitdiffstats
path: root/editor/editor_file_dialog.cpp
diff options
context:
space:
mode:
authorCatchawink <threeeasywords@gmail.com>2019-12-14 05:06:29 -0500
committerCatchawink <threeeasywords@email.com>2019-12-16 09:50:42 -0500
commitb2a14042d52b45ae0554f4146c700b18f50ee92f (patch)
tree478a485bf731a9cb5032d1ecd4afea00a006796c /editor/editor_file_dialog.cpp
parent3a9284b562d6dcfc339322999767168e12220895 (diff)
downloadredot-engine-b2a14042d52b45ae0554f4146c700b18f50ee92f.tar.gz
Fixed issues with using a relative path in the export window.
Before this fix, opening relative export paths inside of an EditorFileDialog was not possible. This was fixed by modifying String::path_to_file() to save relative paths in EditorExportPreset::set_export_path() more appropriately and changing EditorFileDialog::set_current_dir() to open relative paths.
Diffstat (limited to 'editor/editor_file_dialog.cpp')
-rw-r--r--editor/editor_file_dialog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 7fc989b5e9..03da065658 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -958,6 +958,8 @@ String EditorFileDialog::get_current_path() const {
}
void EditorFileDialog::set_current_dir(const String &p_dir) {
+ if (p_dir.is_rel_path())
+ dir_access->change_dir(OS::get_singleton()->get_resource_dir());
dir_access->change_dir(p_dir);
update_dir();
invalidate();