From 1c801c99af0d654cf6d9dfe4c7d791639b11dcbb Mon Sep 17 00:00:00 2001 From: keorn Date: Tue, 27 Sep 2016 15:54:10 +0100 Subject: [PATCH] revert random path drop panic --- devtools/src/random_path.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devtools/src/random_path.rs b/devtools/src/random_path.rs index 6b3649276..9c6c261a2 100644 --- a/devtools/src/random_path.rs +++ b/devtools/src/random_path.rs @@ -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); + } } } }