From: Christophe Romain Date: Thu, 30 Nov 2017 14:32:09 +0000 (+0100) Subject: Windows does not have /tmp, fallback to /home/chris/conf X-Git-Tag: 17.12~79 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=395b74a89fc288741046c99e018a302f52ecba50;p=ejabberd Windows does not have /tmp, fallback to /home/chris/conf --- diff --git a/src/ejabberd_sql.erl b/src/ejabberd_sql.erl index cae41da6c..8d30cf637 100644 --- a/src/ejabberd_sql.erl +++ b/src/ejabberd_sql.erl @@ -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").