瀏覽代碼

Fix data directory of unnamed projects

(cherry picked from commit f6d16d55c6852c49eae181c2444d1f5bc0f3d04d)
kobewi 3 年之前
父節點
當前提交
a58736f129
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      drivers/unix/os_unix.cpp
  2. 1 1
      platform/windows/os_windows.cpp

+ 1 - 1
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 {
 String OS_Unix::get_executable_path() const {

+ 1 - 1
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 {
 String OS_Windows::get_unique_id() const {