From: Ian Jackson Date: Fri, 21 May 2021 17:42:56 +0000 (+0100) Subject: bundles: Clear: Do not produce spurious error in log about .d X-Git-Tag: otter-0.6.0~104 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=b0746d69bac8f473e49203d56f455c850e96204c;p=otter.git bundles: Clear: Do not produce spurious error in log about .d Signed-off-by: Ian Jackson --- diff --git a/src/bundles.rs b/src/bundles.rs index 1114dd9b..6dd2d8a1 100644 --- a/src/bundles.rs +++ b/src/bundles.rs @@ -1103,8 +1103,11 @@ impl InstanceBundles { if_let!{ Ok(_) = File::create(&fpath); Err(e) => { - warn!("failed to truncate a bundle for {}: {}: {}", - instance, fpath, e); + if e.raw_os_error() == Some(libc::EISDIR) { + } else { + warn!("failed to truncate a bundle for {}: {}: {}", + instance, fpath, e); + } continue; } }