Don't watch dirs if not asked to

This commit is contained in:
Aleksey Kladov 2020-06-24 17:11:07 +02:00
parent 1a3b507a00
commit 089ea36b2e

View file

@ -199,7 +199,7 @@ impl LoaderActor {
let is_dir = entry.file_type().is_dir();
let is_file = entry.file_type().is_file();
let abs_path = AbsPathBuf::try_from(entry.into_path()).unwrap();
if is_dir {
if is_dir && watch {
self.watch(abs_path.clone());
}
let rel_path = abs_path.strip_prefix(&path)?;