aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog5
-rw-r--r--src/interp/br-search.boot5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 1d9fdd81..a617910b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2012-08-20 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/br-search.boot (getTemporaryDirectory): Search TMPDIR first.
+ Ensure result has a trailing slash.
+
+2012-08-20 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/br-util.boot (htPred2English,gn): Tidy.
* interp/br-search.boot (pmPreparse): Do not apply pmPreparse,hn.
Tidy.
diff --git a/src/interp/br-search.boot b/src/interp/br-search.boot
index 9890e86b..f1b336fe 100644
--- a/src/interp/br-search.boot
+++ b/src/interp/br-search.boot
@@ -957,8 +957,9 @@ mkGrepTextfile s ==
strconc(systemRootDirectory(),'"/algebra/", STRINGIMAGE s, '".text")
getTemporaryDirectory() ==
- getEnv '"TMP" or getEnv '"TEMP"
- or strconc(systemRootDirectory(),'"/algebra/")
+ t := getEnv '"TMPDIR" or getEnv '"TEMP" or
+ getEnv '"TEMPDIR" or getEnv '"TMP" => ensureTrailingSlash t
+ strconc(systemRootDirectory(),'"/algebra/")
mkGrepFile s == --called to generate a path name for a temporary grep file
suffix := getEnv '"SPADNUM"