From b774d67ea16b81420a7b62ba210b1f1c5ae6aae7 Mon Sep 17 00:00:00 2001 From: Curtis 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(+) (limited to 'bin') diff --git a/bin/watch.c b/bin/watch.c index ed499652..9b83410f 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