diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-05-20 14:17:06 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-05-20 14:17:06 (GMT) |
commit | 648841a413df682da795865db714428f8f6e2d47 (patch) | |
tree | ae68a7200e4642710c6f9baaa55700958b00c760 /unix | |
parent | 276bcea418a3db186a49c67505c81e5c8cf84b7b (diff) | |
download | tcl-648841a413df682da795865db714428f8f6e2d47.zip tcl-648841a413df682da795865db714428f8f6e2d47.tar.gz tcl-648841a413df682da795865db714428f8f6e2d47.tar.bz2 |
[3613567]: Corrected sense of test on results of access() in temp file creation.
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixFCmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 6f443a9..e27f78f 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -2226,13 +2226,13 @@ DefaultTempDir(void) dir = getenv("TMPDIR"); if (dir && dir[0] && stat(dir, &buf) == 0 && S_ISDIR(buf.st_mode) - && access(dir, W_OK)) { + && access(dir, W_OK) == 0) { return dir; } #ifdef P_tmpdir dir = P_tmpdir; - if (stat(dir, &buf) == 0 && S_ISDIR(buf.st_mode) && access(dir, W_OK)) { + if (stat(dir, &buf)==0 && S_ISDIR(buf.st_mode) && access(dir, W_OK)==0) { return dir; } #endif |