aboutsummaryrefslogtreecommitdiffstats
path: root/src/nnn.c
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-03-20 05:50:20 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-03-20 05:50:20 +0530
commitb0960a2e3d89f680eb5a0bc46379309d3a1eae05 (patch)
treec92f9bbb41bcceede94d994135bba13c29699c18 /src/nnn.c
parent58a777375539743ca5815d7fdfc3a62f26b28a1f (diff)
downloadnnn-b0960a2e3d89f680eb5a0bc46379309d3a1eae05.tar.gz
Break when watch desc becomes 0
Diffstat (limited to 'src/nnn.c')
-rw-r--r--src/nnn.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 4e13770..88656ad 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -1454,11 +1454,16 @@ static int nextsel(int presel)
event = (struct inotify_event *) ptr;
DPRINTF_D(event->wd);
DPRINTF_D(event->mask);
+ if (!event->wd)
+ break;
+
if (event->mask & INOTIFY_MASK) {
c = CONTROL('L');
+ DPRINTF_S("issue refresh");
break;
}
}
+ DPRINTF_S("inotify read done");
}
}
#elif defined(BSD_KQUEUE)