aboutsummaryrefslogtreecommitdiffstats
path: root/noice.c
diff options
context:
space:
mode:
authorLazaros Koromilas <lostd@2f30.org>2018-02-25 12:29:36 +0200
committerLazaros Koromilas <lostd@2f30.org>2018-02-25 12:29:36 +0200
commit7810f5bd84f81cdc5d32fc35e67162316a7de94f (patch)
tree29ebbdf2dcdcedb996751c2c9c726c374081c529 /noice.c
parentfef811921b50a2e4a3501e4cef47286c855b4727 (diff)
downloadnoice-7810f5bd84f81cdc5d32fc35e67162316a7de94f.tar.gz
Return early when dir or filter result empty
Diffstat (limited to 'noice.c')
-rw-r--r--noice.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/noice.c b/noice.c
index d78f030..5ee1141 100644
--- 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);
Un proyecto texto-plano.xyz