summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_file_dialog.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index e7d536e08e..991d76ce72 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -294,6 +294,9 @@ void EditorFileDialog::_post_popup() {
if (res && name == "res://") {
name = "/";
} else {
+ if (name.ends_with("/")) {
+ name = name.substr(0, name.length() - 1);
+ }
name = name.get_file() + "/";
}
bool exists = dir_access->dir_exists(recentd[i]);