diff options
Diffstat (limited to 'Src/utils.c')
-rw-r--r-- | Src/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/utils.c b/Src/utils.c index 7a983d48d..340ceb857 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -5422,7 +5422,8 @@ lchdir(char const *path, struct dirsav *d, int hard) } #ifdef HAVE_LSTAT if (*path == '/') - chdir("/"); + if (chdir("/") < 0) + zwarn("failed to chdir(/): %e", errno); for(;;) { while(*path == '/') path++; |