Skip to content

Commit

Permalink
don't end insanity on fail removing directory during renew
Browse files Browse the repository at this point in the history
  • Loading branch information
neelayjunnarkar committed Sep 2, 2024
1 parent 1e260bc commit b3637b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ fn renew_dir(dir: &PathBuf) -> anyhow::Result<()> {

if version != BREAKING_CHANGE_VERSION {
log::info!("Renewing insanity directory: found version {version} but code uses {BREAKING_CHANGE_VERSION}");
std::fs::remove_dir_all(dir)?;
if let Err(e) = std::fs::remove_dir_all(dir) {
log::debug!("Error on removing directory. Continuing anyway. Error {e}");
}
}

std::fs::create_dir_all(dir)?;
Expand Down

0 comments on commit b3637b6

Please sign in to comment.