diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-06-29 14:54:06 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-06-29 14:54:06 (GMT) |
commit | 25ba69eb02a45ced6213d909a7a7f37712177c30 (patch) | |
tree | 2c169fee7d6296592c6b634639949a2b837d416e /unix/tclUnixFCmd.c | |
parent | 0c80a3cac0062e82e9cce20f2bc05c3fc8a4e367 (diff) | |
parent | f0048561b7c9f59ae0be8140bbbdc277ed1fb95e (diff) | |
download | tcl-25ba69eb02a45ced6213d909a7a7f37712177c30.zip tcl-25ba69eb02a45ced6213d909a7a7f37712177c30.tar.gz tcl-25ba69eb02a45ced6213d909a7a7f37712177c30.tar.bz2 |
Merge 8.7
Diffstat (limited to 'unix/tclUnixFCmd.c')
-rw-r--r-- | unix/tclUnixFCmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 7602709..8707cd8 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -2245,17 +2245,17 @@ static const char * DefaultTempDir(void) { const char *dir; - struct stat buf; + Tcl_StatBuf buf; dir = getenv("TMPDIR"); - if (dir && dir[0] && stat(dir, &buf) == 0 && S_ISDIR(buf.st_mode) + if (dir && dir[0] && TclOSstat(dir, &buf) == 0 && S_ISDIR(buf.st_mode) && 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)==0) { + if (TclOSstat(dir, &buf)==0 && S_ISDIR(buf.st_mode) && access(dir, W_OK)==0) { return dir; } #endif |