Fix the empty dir bug

This commit is contained in:
lostd 2014-10-07 14:07:56 +00:00 committed by lostd
parent 908e43cc67
commit 4384f09726

View file

@ -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) {