diff options
-rw-r--r-- | src/crates/candelabra/src/cache.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/crates/candelabra/src/cache.rs b/src/crates/candelabra/src/cache.rs index ad75c4d..ccb61fd 100644 --- a/src/crates/candelabra/src/cache.rs +++ b/src/crates/candelabra/src/cache.rs @@ -122,7 +122,13 @@ pub fn gen_tree_hash(dir: &Utf8Path) -> Result<u64> { let mut hasher = DefaultHasher::new(); for f in glob(&format!("{}/**/*", dir)).unwrap() { - let modified = metadata(f?)?.modified()?; + let f = f?; + let as_str = f.as_os_str().to_str().unwrap(); + if as_str.contains("target/") || as_str.contains(".pr.rs") { + continue; + } + + let modified = metadata(f)?.modified()?; modified.hash(&mut hasher); } |