From f01707b2ae4b065bd6c0df2676e9772110296231 Mon Sep 17 00:00:00 2001 From: Charles Marsh Date: Mon, 15 Aug 2022 13:16:03 -0400 Subject: [PATCH] Use absolute paths for cache --- src/cache.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cache.rs b/src/cache.rs index 661b5b5530..9b45f329a9 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -68,7 +68,11 @@ fn cache_dir() -> &'static str { } fn cache_key(path: &Path) -> String { - format!("{}@{}", path.to_string_lossy(), VERSION) + format!( + "{}@{}", + path.canonicalize().unwrap().to_string_lossy(), + VERSION + ) } pub fn get(path: &Path, mode: &Mode) -> Option> {