]> granicus.if.org Git - ejabberd/commitdiff
Windows does not have /tmp, fallback to /home/chris/conf
authorChristophe Romain <christophe.romain@process-one.net>
Thu, 30 Nov 2017 14:32:09 +0000 (15:32 +0100)
committerChristophe Romain <christophe.romain@process-one.net>
Thu, 30 Nov 2017 14:32:09 +0000 (15:32 +0100)
src/ejabberd_sql.erl

index cae41da6ce3764a71430b8ee9915d2b208c91758..8d30cf63786f119d80c5f4c0fde26a871931486c 100644 (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").