Skip to content

Commit 72e0971

Browse files
committed
fix: align save_last_cache with canonical_path key to ensure correct no-repeat behavior on Linux
- save_last_cache now uses canonical_key() just like load_last_cache - prevents mismatched cache keys on platforms where canonicalize() changes path representation - resolves CI failure on Linux for test_no_repeat_on_same_file
1 parent ebbdd1a commit 72e0971

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/utils.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ pub fn clear_cache_dir() -> io::Result<()> {
163163
pub fn save_last_cache(path: &Path, quote: &str) -> Result<(), String> {
164164
let store = cache_store_path();
165165

166-
// carica mappa esistente o crea nuova
167166
let mut map: HashMap<String, String> = if store.exists() {
168167
serde_json::from_str(&fs::read_to_string(&store).map_err(|e| format!("read cache: {e}"))?)
169168
.unwrap_or_default()

0 commit comments

Comments
 (0)