]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix the empty dir bug
authorlostd <lostd@2f30.org>
Tue, 7 Oct 2014 14:07:56 +0000 (14:07 +0000)
committerlostd <>
Tue, 7 Oct 2014 14:07:56 +0000 (14:07 +0000)
noice.c

diff --git a/noice.c b/noice.c
index 0acd4cba60255b20505e5a4bb346c4def61f055e..549eaa362017a591fcd2b7d282c0e3c075a4ad5d 100644 (file)
--- a/noice.c
+++ b/noice.c
@@ -330,6 +330,10 @@ nochange:
                        char *ext, *bin;
                        pid_t pid;
 
+                       /* Cannot descend in empty directories */
+                       if (n == 0)
+                               goto nochange;
+
                        name = dents[cur]->d_name;
 
                        switch (dents[cur]->d_type) {