Don't terminate du(1) if chdir(2) fails

This commit is contained in:
FRIGN 2015-02-18 22:04:32 +01:00
parent 2137dfa334
commit 8c041cd115

4
du.c
View File

@ -51,7 +51,7 @@ push(const char *path)
cwd = agetcwd();
if (chdir(path) < 0)
eprintf("chdir: %s:", path);
weprintf("chdir: %s:", path);
return cwd;
}
@ -59,7 +59,7 @@ static void
pop(char *path)
{
if (chdir(path) < 0)
eprintf("chdir: %s:", path);
weprintf("chdir: %s:", path);
free(path);
}