From 9d2ca6a1eb0ad82b23e3aec321fb4f4b059a16fd Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 24 Jan 2013 15:27:27 +0000 Subject: [PATCH] don't use HOME on Windows (try APPDATA instead) --- Common/Context.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Common/Context.cpp b/Common/Context.cpp index 787c4b6a4a..b7cccb6855 100644 --- a/Common/Context.cpp +++ b/Common/Context.cpp @@ -23,8 +23,13 @@ CTX::CTX() const char *tmp; if((tmp = GetEnvironmentVar("GMSH_HOME"))) homeDir = tmp; +#if defined(WIN32) + else if((tmp = GetEnvironmentVar("APPDATA"))) + homeDir = tmp; +#else else if((tmp = GetEnvironmentVar("HOME"))) homeDir = tmp; +#endif else if((tmp = GetEnvironmentVar("TMP"))) homeDir = tmp; else if((tmp = GetEnvironmentVar("TEMP"))) -- GitLab