ls: set a return error code when skipping an already visited path.
This commit is contained in:
parent
340b163563
commit
ac05587385
4
ls.c
4
ls.c
|
@ -333,8 +333,8 @@ ls(const char *path, const struct entry *ent, int listdir)
|
||||||
} else if (S_ISDIR(ent->mode) ||
|
} else if (S_ISDIR(ent->mode) ||
|
||||||
(S_ISLNK(ent->mode) && S_ISDIR(ent->tmode))) {
|
(S_ISLNK(ent->mode) && S_ISDIR(ent->tmode))) {
|
||||||
if ((treeind = visit(ent)) < 0) {
|
if ((treeind = visit(ent)) < 0) {
|
||||||
fprintf(stderr, "%s%s: already visited\n",
|
ret = 1;
|
||||||
path, ent->name);
|
weprintf("%s%s: Already visited\n", path, ent->name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user