summaryrefslogtreecommitdiff
path: root/cli/cache
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-08-28 19:47:15 -0400
committerGitHub <noreply@github.com>2024-08-28 23:47:15 +0000
commit3afa3db4d394b0e63e63ad4e09645f74eea39c4a (patch)
treedf8f7fdc04edaa3f357141cdd6b63acf5180ccfd /cli/cache
parent37501aa32357e75b9ddc92198da94d92fcdd0798 (diff)
fix: delete old Deno 1.x headers file when loading cache (#25283)
Diffstat (limited to 'cli/cache')
-rw-r--r--cli/cache/mod.rs4
1 files changed, 4 insertions, 0 deletions
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<Option<SystemTime>> {
match std::fs::metadata(path) {
Ok(metadata) => Ok(Some(