1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 09:04:12 +02:00

no error on clean when workdir doesnt exist in the first place

This commit is contained in:
Robin Appelman 2021-07-09 14:45:01 +02:00
commit 8a43282fc9

View file

@ -375,11 +375,13 @@ impl Cloud {
.remove_network(&self.network)
.await
.wrap_err("Failed to remove network")?;
if let Err(e) = remove_dir_all(self.workdir)
.await
.wrap_err("Failed to remove work directory")
{
eprintln!("{}", e);
if self.workdir.exists() {
if let Err(e) = remove_dir_all(self.workdir)
.await
.wrap_err("Failed to remove work directory")
{
eprintln!("{}", e);
}
}
Ok(())