Skip to content

Commit

Permalink
don't throw an error when the assets cache doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ealmloff committed Feb 22, 2024
1 parent c5d9fed commit 4b96a1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common/src/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ use crate::{
/// Clears all assets from the current package
pub fn clear_assets() -> std::io::Result<()> {
let dir = current_package_cache_dir();
std::fs::remove_dir_all(dir)
if dir.exists() {
std::fs::remove_dir_all(dir)?;
}
Ok(())
}

/// Adds an asset to the current package
Expand Down

0 comments on commit 4b96a1f

Please sign in to comment.