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 | 0eb5b1db67343f2a0f3ca3acaf567db4f3c7b9cf (patch) | |
tree | ae68a7200e4642710c6f9baaa55700958b00c760 /unix | |
parent | 5ed45c8735ed45385180fdf76546bf0dfacb6cd5 (diff) | |
download | tcl-0eb5b1db67343f2a0f3ca3acaf567db4f3c7b9cf.zip tcl-0eb5b1db67343f2a0f3ca3acaf567db4f3c7b9cf.tar.gz tcl-0eb5b1db67343f2a0f3ca3acaf567db4f3c7b9cf.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 |