diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-09-05 17:15:40 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-09-06 15:38:12 +0200 |
| commit | df4620c74a958260a1618c6f95697488d84fb90e (patch) | |
| tree | ab81296d28355ca3ed16c8bcc29e39a75b070055 | |
| parent | fa40eadbd91a9d9e3432cf7d4bb2a4df5e8f4717 (diff) | |
| download | mullvadvpn-df4620c74a958260a1618c6f95697488d84fb90e.tar.xz mullvadvpn-df4620c74a958260a1618c6f95697488d84fb90e.zip | |
Only log error on "important" error
| -rw-r--r-- | talpid-core/src/mktemp.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/talpid-core/src/mktemp.rs b/talpid-core/src/mktemp.rs index 69fa01f97f..7c0cc11b49 100644 --- a/talpid-core/src/mktemp.rs +++ b/talpid-core/src/mktemp.rs @@ -1,5 +1,6 @@ use std::env; use std::path::{Path, PathBuf}; +use std::io; use std::fs; use uuid::Uuid; @@ -31,7 +32,9 @@ impl AsRef<Path> for TempFile { impl Drop for TempFile { fn drop(&mut self) { if let Err(e) = fs::remove_file(&self.path) { - error!("Unable to remove TempFile {}: {:?}", self.path.to_string_lossy(), e); + if e.kind() != io::ErrorKind::NotFound { + error!("Unable to remove temp file {}: {:?}", self.path.to_string_lossy(), e); + } } } } |
