diff --git a/commons/src/cache/app_cache.rs b/commons/src/cache/app_cache.rs index d32859bf..cf099615 100644 --- a/commons/src/cache/app_cache.rs +++ b/commons/src/cache/app_cache.rs @@ -152,7 +152,7 @@ impl AppCache { fs_err::create_dir_all(&self.path).map_err(CacheError::IoError)?; fs_err::create_dir_all(&self.cache).map_err(CacheError::IoError)?; - fs_extra::dir::move_dir( + fs_extra::dir::copy( &self.cache, &self.path, &CopyOptions { @@ -170,6 +170,8 @@ impl AppCache { })?; copy_mtime_r(&self.cache, &self.path)?; + fs_err::remove_dir_all(&self.cache).map_err(CacheError::IoError)?; + Ok(self) }