From d15d28f6e612d4226600b59b6eef94759c599d17 Mon Sep 17 00:00:00 2001 From: Tom Gowan Date: Wed, 1 May 2019 10:05:34 +1000 Subject: [PATCH] fixes #15 --- src/watch.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/watch.rs b/src/watch.rs index ef92ebf..d8a8a89 100644 --- a/src/watch.rs +++ b/src/watch.rs @@ -99,9 +99,11 @@ fn create_watch( watcher .watch(&vp, RecursiveMode::NonRecursive) .map_err(Error::FileWatch)?; - watcher - .watch(&fp, RecursiveMode::NonRecursive) - .map_err(Error::FileWatch)?; + if vp != fp { + watcher + .watch(&fp, RecursiveMode::NonRecursive) + .map_err(Error::FileWatch)?; + } let (loader, rx) = Loader::create(vert_path, frag_path);