You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Rename OS::get_data_dir to OS::get_user_data_dir
Will be needed to avoid confusion with system data path (XDG_DATA_HOME) and editor data dir in upcoming refactoring.
This commit is contained in:
@@ -38,7 +38,7 @@ String DirAccess::_get_root_path() const {
|
||||
switch (_access_type) {
|
||||
|
||||
case ACCESS_RESOURCES: return ProjectSettings::get_singleton()->get_resource_path();
|
||||
case ACCESS_USERDATA: return OS::get_singleton()->get_data_dir();
|
||||
case ACCESS_USERDATA: return OS::get_singleton()->get_user_data_dir();
|
||||
default: return "";
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ String DirAccess::fix_path(String p_path) const {
|
||||
|
||||
if (p_path.begins_with("user://")) {
|
||||
|
||||
String data_dir = OS::get_singleton()->get_data_dir();
|
||||
String data_dir = OS::get_singleton()->get_user_data_dir();
|
||||
if (data_dir != "") {
|
||||
|
||||
return p_path.replace_first("user:/", data_dir);
|
||||
|
||||
Reference in New Issue
Block a user