mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Better handling of temporary folders
This commit is contained in:
parent
f87994edc7
commit
7e4462e0ac
6 changed files with 34 additions and 17 deletions
|
@ -729,7 +729,7 @@ int ModApiMainMenu::l_get_cache_path(lua_State *L)
|
|||
int ModApiMainMenu::l_get_temp_path(lua_State *L)
|
||||
{
|
||||
if (lua_isnoneornil(L, 1) || !lua_toboolean(L, 1))
|
||||
lua_pushstring(L, fs::TempPath().c_str());
|
||||
lua_pushstring(L, fs::CreateTempDir().c_str());
|
||||
else
|
||||
lua_pushstring(L, fs::CreateTempFile().c_str());
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue