revert random path drop panic

This commit is contained in:
keorn 2016-09-27 15:54:10 +01:00
parent 28cf91c7a5
commit 1c801c99af

View File

@ -86,7 +86,9 @@ impl Drop for RandomTempPath {
fn drop(&mut self) {
if let Err(_) = fs::remove_dir_all(&self) {
if let Err(e) = fs::remove_file(&self) {
println!("Failed to remove temp directory. Here's what prevented this from happening: ({})", e);
if self.panic_on_drop_failure {
panic!("Failed to remove temp directory. Here's what prevented this from happening: ({})", e);
}
}
}
}