Browse Source

Remove trailing slash from recent dir if needed

Paweł Fertyk 4 years ago
parent
commit
709e71ae9c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      editor/editor_file_dialog.cpp

+ 3 - 0
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]);