sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 12ad56382b71f2e150f0ce0c301cef1d3445d39a
parent c4c45c96371fa5a47921c95861de67e5f0cb569b
Author: Quentin Rameau <quinq@fifth.space>
Date:   Thu Feb 18 12:46:48 +0100

ls: set a return error code when skipping an already visited path.

Diffstat:
ls.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ls.c b/ls.c @@ -333,8 +333,8 @@ ls(const char *path, const struct entry *ent, int listdir) } 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; }