Don't terminate du(1) if chdir(2) fails
This commit is contained in:
parent
2137dfa334
commit
8c041cd115
4
du.c
4
du.c
@ -51,7 +51,7 @@ push(const char *path)
|
|||||||
|
|
||||||
cwd = agetcwd();
|
cwd = agetcwd();
|
||||||
if (chdir(path) < 0)
|
if (chdir(path) < 0)
|
||||||
eprintf("chdir: %s:", path);
|
weprintf("chdir: %s:", path);
|
||||||
return cwd;
|
return cwd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ static void
|
|||||||
pop(char *path)
|
pop(char *path)
|
||||||
{
|
{
|
||||||
if (chdir(path) < 0)
|
if (chdir(path) < 0)
|
||||||
eprintf("chdir: %s:", path);
|
weprintf("chdir: %s:", path);
|
||||||
free(path);
|
free(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user