diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2019-04-30 18:31:47 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2019-04-30 18:31:47 (GMT) |
commit | fd0444bf94a1f315cb724abf0374890fb9b7e310 (patch) | |
tree | 0f00fe6bd053e3af9122c8ae8927992772e227ea /unix | |
parent | ae1d2d2d40e05b234f974ec40e5f073f10107b42 (diff) | |
download | tcl-fd0444bf94a1f315cb724abf0374890fb9b7e310.zip tcl-fd0444bf94a1f315cb724abf0374890fb9b7e310.tar.gz tcl-fd0444bf94a1f315cb724abf0374890fb9b7e310.tar.bz2 |
Implementation of [file tempdir]; hand-tested on OSX...
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixFCmd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 861ff66..3e1a5c2 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -2314,7 +2314,9 @@ TclpCreateTemporaryDirectory( Tcl_DStringAppend(&template, DefaultTempDir(), -1); /* INTL: native */ } - TclDStringAppendLiteral(&template, "/"); + if (Tcl_DStringValue(&template)[Tcl_DStringLength(&template) - 1] != '/') { + TclDStringAppendLiteral(&template, "/"); + } if (basenameObj) { string = TclGetString(basenameObj); |