From e324daa19349f7e7aa12198efad4848d2dd21a33 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Sun, 5 Jul 2009 23:18:01 +0000 Subject: [PATCH] Added another way to set the tmp dir. --- Cantera/src/base/misc.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Cantera/src/base/misc.cpp b/Cantera/src/base/misc.cpp index 196ee7482..30f33b27e 100755 --- a/Cantera/src/base/misc.cpp +++ b/Cantera/src/base/misc.cpp @@ -490,11 +490,16 @@ namespace Cantera { { // if TMP or TEMP is set, use it for the temporary // directory - char* tmpdir = getenv("TMP"); - if (tmpdir == 0) - tmpdir = getenv("TEMP"); - if (tmpdir != 0) - tmp_dir = string(tmpdir); + char* ctmpdir = getenv("CANTERA_TMPDIR"); + if (ctmpdir != 0) { + tmp_dir = string(ctmpdir); + } else { + char* tmpdir = getenv("TMP"); + if (tmpdir == 0) + tmpdir = getenv("TEMP"); + if (tmpdir != 0) + tmp_dir = string(tmpdir); + } // if SLEEP is set, use it as the sleep time char* sleepstr = getenv("SLEEP");