From 709e71ae9c050a5b28b662d885d24acf31853a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Fertyk?= Date: Mon, 14 Jun 2021 17:51:57 +0200 Subject: Remove trailing slash from recent dir if needed --- editor/editor_file_dialog.cpp | 3 +++ 1 file changed, 3 insertions(+) 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]); -- cgit v1.2.3