mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
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.
This commit is contained in:
parent
1d04903c19
commit
19e936362a
4 changed files with 40 additions and 15 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue