checkin from browser
authorClaus Gittinger <cg@exept.de>
Tue, 12 Nov 1996 12:21:43 +0100
changeset 1968 cafe70987588
parent 1967 e8a6fb1e14ce
child 1969 82192c7170bc
checkin from browser
Filename.st
--- a/Filename.st	Tue Nov 12 11:36:42 1996 +0100
+++ b/Filename.st	Tue Nov 12 12:21:43 1996 +0100
@@ -395,23 +395,24 @@
 
 tempDirectory
     "return the temp directory as a filename.
-     If any of the environment variables ST_TMPDIR or TMPDIR is set, 
-     its value defines the name, otherwise, '/tmp' is used.
-     (at least on unix ...).
+     If any of the environment variables STX_TMPDIR, ST_TMPDIR,
+     TMPDIR or TEMPDIR is set, its value defines the name, 
+     otherwise, '/tmp' is used. (at least on unix ...).
 
      Notice: do not hardcode '/tmp' into your programs - things may be
-	     different on other OS's. Also, the user may want to set the
-	     TMPDIR environment variable to have her temp files somewhere else.
-	     (especially on SUNOS, the root partition is ALWAYS too small ..."
+             different on other OS's. Also, the user may want to set the
+             TMPDIR environment variable to have her temp files somewhere else.
+             (especially on SUNOS, the root partition is ALWAYS too small ..."
 
     |tempDir|
 
-    tempDir := OperatingSystem getEnvironment:'ST_TMPDIR'.
+    #('STX_TMPDIR' 'ST_TMPDIR' 'TMPDIR' 'TEMPDIR') do:[:envVar |
+        tempDir isNil ifTrue:[
+            tempDir := OperatingSystem getEnvironment:envVar.
+        ].
+    ].
     tempDir isNil ifTrue:[
-	tempDir := OperatingSystem getEnvironment:'TMPDIR'.
-	tempDir isNil ifTrue:[
-	    tempDir := '/tmp'
-	].
+        tempDir := '/tmp'
     ].
     ^ self named:tempDir
 
@@ -422,7 +423,7 @@
 
     "Modified: 7.9.1995 / 10:48:31 / claus"
     "Created: 7.3.1996 / 14:51:18 / cg"
-    "Modified: 7.3.1996 / 14:53:10 / cg"
+    "Modified: 12.11.1996 / 12:21:06 / cg"
 ! !
 
 !Filename class methodsFor:'queries'!
@@ -2055,5 +2056,5 @@
 !Filename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.71 1996-11-01 19:52:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.72 1996-11-12 11:21:43 cg Exp $'
 ! !