aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHristo Venev <hristo@venev.name>2020-02-06 15:02:34 +0100
committerHristo Venev <hristo@venev.name>2020-02-06 15:02:34 +0100
commit497294f75c383e545548dbe537ea0df5cd661667 (patch)
tree72b7dd37d7af737219901b4f19d9071bda6b3a8e /src
parentfa31b1a5177805b06058d414ed5a8b30408f4d6e (diff)
Don't die if removing a temporary file fails.
Diffstat (limited to 'src')
-rw-r--r--src/fileutil.rs4
1 files changed, 3 insertions, 1 deletions
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);
+ }
}
}