diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/unix/os_unix.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 1af37e2a60..ef4cf644fd 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -382,9 +382,15 @@ String OS_Unix::get_data_dir() const { String an = Globals::get_singleton()->get("application/name"); if (an!="") { + + if (has_environment("HOME")) { - return get_environment("HOME")+"/."+an; + bool use_godot = Globals::get_singleton()->get("application/use_shared_user_dir"); + if (use_godot) + return get_environment("HOME")+"/.godot/app_userdata/"+an; + else + return get_environment("HOME")+"/."+an; } } |