diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-08-28 19:47:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-28 23:47:15 +0000 |
commit | 3afa3db4d394b0e63e63ad4e09645f74eea39c4a (patch) | |
tree | df8f7fdc04edaa3f357141cdd6b63acf5180ccfd /cli/cache | |
parent | 37501aa32357e75b9ddc92198da94d92fcdd0798 (diff) |
fix: delete old Deno 1.x headers file when loading cache (#25283)
Diffstat (limited to 'cli/cache')
-rw-r--r-- | cli/cache/mod.rs | 4 |
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( |