summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-09-24 22:58:43 +0200
committerGitHub <noreply@github.com>2022-09-24 22:58:43 +0200
commit01e26bdcf8a2d231353033f05e4d35465641f90f (patch)
tree0e2d547141ab767e1f14503621a56fb28cc5d074 /main
parentf74491fdee9bc2d68668137fbacd8f3a7e7e8df7 (diff)
parentbb71e928265b722452efde5e34365af121d7aa0c (diff)
Merge pull request #66364 from aaronfranke/projectman-selfcontained
Fix project manager not working in self-contained mode
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/main/main.cpp b/main/main.cpp
index fa7df8d705..aac77c1625 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -157,6 +157,7 @@ static bool show_help = false;
static bool auto_quit = false;
static OS::ProcessID editor_pid = 0;
#ifdef TOOLS_ENABLED
+static bool found_project = false;
static bool auto_build_solutions = false;
static String debug_server_uri;
static int converter_max_kb_file = 4 * 1024; // 4MB
@@ -707,9 +708,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
Vector<String> breakpoints;
bool use_custom_res = true;
bool force_res = false;
-#ifdef TOOLS_ENABLED
- bool found_project = false;
-#endif
String default_renderer = "";
String renderer_hints = "";
@@ -1938,7 +1936,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
#ifdef TOOLS_ENABLED
if (editor || project_manager || cmdline_tool) {
EditorPaths::create();
- if (EditorPaths::get_singleton()->is_self_contained()) {
+ if (found_project && EditorPaths::get_singleton()->is_self_contained()) {
if (ProjectSettings::get_singleton()->get_resource_path() == OS::get_singleton()->get_executable_path().get_base_dir()) {
ERR_PRINT("You are trying to run a self-contained editor at the same location as a project. This is not allowed, since editor files will mix with project files.");
OS::get_singleton()->set_exit_code(EXIT_FAILURE);