commit | ac055873858cc8d46390f975bc33e36283311aac | [log] [tgz] |
---|---|---|
author | Quentin Rameau <quinq@fifth.space> | Thu Feb 18 12:46:48 2016 +0100 |
committer | sin <sin@2f30.org> | Thu Feb 18 14:17:21 2016 +0000 |
tree | a1d309caf607aebf385e2714295c60b699787369 | |
parent | 340b1635631b08be4554d937cf5895194b4733d6 [diff] |
ls: set a return error code when skipping an already visited path.
diff --git a/ls.c b/ls.c index f5b3e76..5dbff37 100644 --- a/ls.c +++ b/ls.c
@@ -333,8 +333,8 @@ } else if (S_ISDIR(ent->mode) || (S_ISLNK(ent->mode) && S_ISDIR(ent->tmode))) { if ((treeind = visit(ent)) < 0) { - fprintf(stderr, "%s%s: already visited\n", - path, ent->name); + ret = 1; + weprintf("%s%s: Already visited\n", path, ent->name); return; }