Skip to content

Commit

Permalink
Try method of reversing self.created_directories during clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mesaprotector authored Sep 3, 2024
1 parent 4b94a18 commit deaec11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/enclosure/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ impl Enclosure {
debug!("removing temporary file {}", file.display());
std::fs::remove_file(file)?;
}
for dir in &self.created_directories {
for dir in (&self.created_directories).iter().rev() {
debug!("removing temporary directory {}", dir.display());
std::fs::remove_dir(dir)?;
}
Expand Down

0 comments on commit deaec11

Please sign in to comment.