diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-06-15 14:58:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-15 14:58:05 +0200 |
commit | 3942ea68a8e54d06795389ec87545b14dd84a93f (patch) | |
tree | 8877d42c58edb4f66159e61cb04adb39f77aa78f | |
parent | 91d6382786ca0bd0aedb9c3a259db7593738f7ca (diff) | |
parent | 709e71ae9c050a5b28b662d885d24acf31853a80 (diff) |
Merge pull request #49604 from pfertyk/issue-49453-wrong-recent-directory-names
Remove trailing slash from recent dir if needed
-rw-r--r-- | editor/editor_file_dialog.cpp | 3 |
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]); |