From 9d2967000ee40227f9120c256f47fbc5f55183cd Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 20 Aug 2012 15:34:44 +0000 Subject: * interp/br-search.boot (getTemporaryDirectory): Search TMPDIR first. Ensure result has a trailing slash. --- src/ChangeLog | 5 +++++ src/interp/br-search.boot | 5 +++-- 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,3 +1,8 @@ +2012-08-20 Gabriel Dos Reis + + * interp/br-search.boot (getTemporaryDirectory): Search TMPDIR first. + Ensure result has a trailing slash. + 2012-08-20 Gabriel Dos Reis * interp/br-util.boot (htPred2English,gn): 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" -- cgit v1.2.3