Merge pull request #102307 from KoBeWi/so_that's_what_it_does

Setup working directory when quitting to project manager
This commit is contained in:
Thaddeus Crews 2025-02-03 08:16:00 -06:00
commit 5696316a89
No known key found for this signature in database
GPG Key ID: 62181B86FE9E5D84

View File

@ -2069,6 +2069,13 @@ void EditorNode::restart_editor(bool p_goto_project_manager) {
if (p_goto_project_manager) {
args.push_back("--project-manager");
// Setup working directory.
const String exec_dir = OS::get_singleton()->get_executable_path().get_base_dir();
if (!exec_dir.is_empty()) {
args.push_back("--path");
args.push_back(exec_dir);
}
} else {
args.push_back("--path");
args.push_back(ProjectSettings::get_singleton()->get_resource_path());