From 497294f75c383e545548dbe537ea0df5cd661667 Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Thu, 6 Feb 2020 15:02:34 +0100 Subject: Don't die if removing a temporary file fails. --- src/fileutil.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/fileutil.rs b/src/fileutil.rs index b138955..2c322c4 100644 --- a/src/fileutil.rs +++ b/src/fileutil.rs @@ -18,7 +18,9 @@ impl Drop for Temp { if self.path.as_os_str().is_empty() { return; } - fs::remove_file(&self.path).expect("failed to clean up temporary file"); + if let Err(err) = fs::remove_file(&self.path) { + eprintln!("<3>Failed to clean up temporary file: {}", err); + } } } -- cgit