--- find.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/find.c b/find.c index 7243072..ce551e5 100644 --- a/find.c +++ b/find.c @@ -960,6 +960,7 @@ find(char *path, struct findhist *hist) if (do_stat(path, &st, hist) < 0) { weprintf("failed to stat %s:", path); + gflags.ret = 1; return; } @@ -981,6 +982,7 @@ find(char *path, struct findhist *hist) for (f = hist; f; f = f->next) { if (f->dev == st.st_dev && f->ino == st.st_ino) { weprintf("loop detected '%s' is '%s'\n", path, f->path); + gflags.ret = 1; return; } } @@ -991,6 +993,7 @@ find(char *path, struct findhist *hist) if (!(dir = opendir(path))) { weprintf("failed to opendir %s:", path); + gflags.ret = 1; /* should we just ignore this since we hit an error? */ if (gflags.depth) eval(root, &arg); @@ -1014,6 +1017,7 @@ find(char *path, struct findhist *hist) free(pathbuf); if (errno) { weprintf("readdir %s:", path); + gflags.ret = 1; closedir(dir); return; } -- 2.48.1
- [hackers] [sbase][PATCH 5/6] libutil/mode: Fi... Tavian Barnes
- Re: [hackers] [sbase][PATCH 5/6] libutil... Roberto E . Vargas Caballero
- [hackers] [sbase][PATCH 3/6] find: Fix spawn(... Tavian Barnes
- Re: [hackers] [sbase][PATCH 3/6] find: F... Evan Gates
- Re: [hackers] [sbase][PATCH 3/6] fin... Tavian Barnes
- Re: [hackers] [sbase][PATCH 3/6] fin... Roberto E . Vargas Caballero
- [hackers] [sbase][PATCH 4/6] find: Use the cu... Tavian Barnes
- Re: [hackers] [sbase][PATCH 4/6] find: U... Roberto E . Vargas Caballero
- Re: [hackers] [sbase][PATCH 4/6] find: U... Tavian Barnes
- Re: [hackers] [sbase][PATCH 4/6] fin... Roberto E. Vargas Caballero
- [hackers] [sbase][PATCH 2/6] find: Don't exit... Tavian Barnes
- Re: [hackers] [sbase][PATCH 2/6] find: D... Roberto E . Vargas Caballero
- [hackers] [sbase][PATCH 6/6] find: Implement ... Tavian Barnes
- [hackers] Re: [sbase][PATCH 6/6] find: I... Tavian Barnes
- Re: [hackers] Re: [sbase][PATCH 6/6]... Roberto E . Vargas Caballero
- Re: [hackers] [sbase][PATCH 1/6] find: Fall b... Roberto E . Vargas Caballero