From 5bda8fae38d633a939dbff46b1a6dcf7c893de19 Mon Sep 17 00:00:00 2001 From: Leleat Date: Sun, 13 Sep 2020 14:49:53 +0200 Subject: [PATCH] creater user-dir, if non-existant and pressing 'Open Project Data Folder' (cherry picked from commit 8cf9d09d6169f114bb78d93ede904a60ea74ddaf) --- editor/editor_node.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 0c1dcee9ebe..7ba40caf688 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2594,6 +2594,8 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { } } break; case RUN_PROJECT_DATA_FOLDER: { + // ensure_user_data_dir() to prevent the edge case: "Open Project Data Folder" won't work after the project was renamed in ProjectSettingsEditor unless the project is saved + OS::get_singleton()->ensure_user_data_dir(); OS::get_singleton()->shell_open(String("file://") + OS::get_singleton()->get_user_data_dir()); } break; case FILE_EXPLORE_ANDROID_BUILD_TEMPLATES: {