diff options
Diffstat (limited to 'lib/sh/tmpfile.c')
-rw-r--r-- | lib/sh/tmpfile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sh/tmpfile.c b/lib/sh/tmpfile.c index e28f94d0..fb7b732d 100644 --- a/lib/sh/tmpfile.c +++ b/lib/sh/tmpfile.c @@ -62,20 +62,20 @@ get_sys_tmpdir () #ifdef P_tmpdir sys_tmpdir = P_tmpdir; - if (stat (sys_tmpdir, &sb) == 0) + if (file_iswdir (sys_tmpdir)) return sys_tmpdir; #endif sys_tmpdir = "/tmp"; - if (stat (sys_tmpdir, &sb) == 0) + if (file_iswdir (sys_tmpdir)) return sys_tmpdir; sys_tmpdir = "/var/tmp"; - if (stat (sys_tmpdir, &sb) == 0) + if (file_iswdir (sys_tmpdir)) return sys_tmpdir; sys_tmpdir = "/usr/tmp"; - if (stat (sys_tmpdir, &sb) == 0) + if (file_iswdir (sys_tmpdir)) return sys_tmpdir; sys_tmpdir = DEFAULT_TMPDIR; |