瀏覽代碼

Remove trailing slash from recent dir if needed

Paweł Fertyk 4 年之前
父節點
當前提交
709e71ae9c
共有 1 個文件被更改,包括 3 次插入0 次删除
  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]);