From a58736f1295c7a68270c5a4af3fba59b6e7e4a52 Mon Sep 17 00:00:00 2001 From: kobewi Date: Thu, 18 Nov 2021 01:36:13 +0100 Subject: [PATCH] Fix data directory of unnamed projects (cherry picked from commit f6d16d55c6852c49eae181c2444d1f5bc0f3d04d) --- drivers/unix/os_unix.cpp | 2 +- platform/windows/os_windows.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index ea9ac1fd730..c358ee93f1c 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -464,7 +464,7 @@ String OS_Unix::get_user_data_dir() const { } } - return ProjectSettings::get_singleton()->get_resource_path(); + return get_data_path().plus_file(get_godot_dir_name()).plus_file("app_userdata").plus_file("[unnamed project]"); } String OS_Unix::get_executable_path() const { diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 29157ee6157..2aab5f4078d 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -3477,7 +3477,7 @@ String OS_Windows::get_user_data_dir() const { } } - return ProjectSettings::get_singleton()->get_resource_path(); + return get_data_path().plus_file(get_godot_dir_name()).plus_file("app_userdata").plus_file("[unnamed project]"); } String OS_Windows::get_unique_id() const {