From 3afa3db4d394b0e63e63ad4e09645f74eea39c4a Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 28 Aug 2024 19:47:15 -0400 Subject: fix: delete old Deno 1.x headers file when loading cache (#25283) --- cli/cache/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cli/cache') diff --git a/cli/cache/mod.rs b/cli/cache/mod.rs index cc183530d..4500e3a4a 100644 --- a/cli/cache/mod.rs +++ b/cli/cache/mod.rs @@ -74,6 +74,10 @@ impl deno_cache_dir::DenoCacheEnv for RealDenoCacheEnv { atomic_write_file_with_retries(path, bytes, CACHE_PERM) } + fn remove_file(&self, path: &Path) -> std::io::Result<()> { + std::fs::remove_file(path) + } + fn modified(&self, path: &Path) -> std::io::Result> { match std::fs::metadata(path) { Ok(metadata) => Ok(Some( -- cgit v1.2.3