Use absolute paths for cache

This commit is contained in:
Charles Marsh 2022-08-15 13:16:03 -04:00
parent 1768c4b7d3
commit f01707b2ae
1 changed files with 5 additions and 1 deletions

View File

@ -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<Vec<Message>> {