From b0746d69bac8f473e49203d56f455c850e96204c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 21 May 2021 18:42:56 +0100 Subject: [PATCH] bundles: Clear: Do not produce spurious error in log about .d Signed-off-by: Ian Jackson --- src/bundles.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } } -- 2.30.2