aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorWilliam Breathitt Gray <vilhelm.gray@gmail.com>2022-09-16 07:19:44 -0400
committerGitHub <noreply@github.com>2022-09-16 13:19:44 +0200
commit19e936362aab3806a9554ab811be0562dcb41509 (patch)
treea486e08bae52c7032425bf051ec069f23a8d1696 /src/main.cpp
parent1d04903c1973591e795d3275b900d76d7cb7877a (diff)
downloadminetest-19e936362aab3806a9554ab811be0562dcb41509.tar.xz
Add support for MINETEST_USERDATA environment variable (#12639)
The MINETEST_USER_PATH environment variable can be used to define a custom path for Minetest user data. If MINETEST_USER_PATH is empty or unset, the HOME (or APPDATA on Windows) environment variable is used as the default user data path; this ensures backwards compatibility with existing user setups.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index fa4fd604f..401f289df 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -527,7 +527,7 @@ static bool create_userdata_path()
}
#else
// Create user data directory
- success = fs::CreateDir(porting::path_user);
+ success = fs::CreateAllDirs(porting::path_user);
#endif
return success;