Windows does not have /tmp, fallback to /home/chris/conf

This commit is contained in:
Christophe Romain 2017-11-30 15:32:09 +01:00
parent a5849a0dab
commit 395b74a89f
1 changed files with 4 additions and 1 deletions

View File

@ -1053,7 +1053,10 @@ init_mssql(Host) ->
end.
tmp_dir() ->
filename:join(["/tmp", "ejabberd"]).
case os:type() of
{win32, _} -> filename:join([os:getenv("HOME"), "conf"]);
_ -> filename:join(["/tmp", "ejabberd"])
end.
odbc_config() ->
filename:join(tmp_dir(), "odbc.ini").