commit 7810f5bd84f81cdc5d32fc35e67162316a7de94f
parent fef811921b50a2e4a3501e4cef47286c855b4727
Author: Lazaros Koromilas <lostd@2f30.org>
Date: Sun, 25 Feb 2018 12:29:36 +0200
Return early when dir or filter result empty
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/noice.c b/noice.c
@@ -529,6 +529,8 @@ populate(char *path, char *oldpath, char *fltr)
ndents = dentfill(path, &dents, visible, &re);
freefilter(&re);
+ if (ndents == 0)
+ return 0; /* Empty result */
qsort(dents, ndents, sizeof(*dents), entrycmp);