From 141e2f1807770bfc72a72ded6a7a4cf54f669062 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Thu, 20 Jan 2022 15:49:59 +0200 Subject: [PATCH] Revert "Remove entire cache folder, not just contents (#820)" This reverts commit 2945104d396d35c25f19d283e53aafe26a3a65f3. --- ethers-solc/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethers-solc/src/lib.rs b/ethers-solc/src/lib.rs index 1f43908e..d68e7cd8 100644 --- a/ethers-solc/src/lib.rs +++ b/ethers-solc/src/lib.rs @@ -500,7 +500,7 @@ impl Project { pub fn cleanup(&self) -> std::result::Result<(), SolcIoError> { tracing::trace!("clean up project"); if self.cache_path().exists() { - std::fs::remove_dir_all(self.cache_path()) + std::fs::remove_file(self.cache_path()) .map_err(|err| SolcIoError::new(err, self.cache_path()))?; tracing::trace!("removed cache file \"{}\"", self.cache_path().display()); }