From: lostd Date: Tue, 7 Oct 2014 14:07:56 +0000 (+0000) Subject: Fix the empty dir bug X-Git-Tag: v1.0~92^2~262 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=4384f09726a3178ee6c9c38d0c357068d66140a2;p=nnn.git Fix the empty dir bug --- diff --git a/noice.c b/noice.c index 0acd4cba..549eaa36 100644 --- 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) {