From 7c88364f61728b67cc4b5ec1cce310fc6b8d5cf7 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sun, 8 Apr 2018 12:53:26 -0400 Subject: Sleep in watch when a file is deleted Reopening the path immediately would always fail. Wait a second for the file to hopefully reappear. --- bin/watch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/watch.c b/bin/watch.c index 442835fa..f33c9ee7 100644 --- a/bin/watch.c +++ b/bin/watch.c @@ -85,6 +85,7 @@ int main(int argc, char *argv[]) { if (event.fflags & NOTE_DELETE) { close(event.ident); + sleep(1); watch(kq, event.udata); } -- cgit 1.4.1