chiark / gitweb /
bundles: Clear: Do not produce spurious error in log about .d
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 21 May 2021 17:42:56 +0000 (18:42 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 21 May 2021 17:45:30 +0000 (18:45 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bundles.rs

index 1114dd9b219ab318aeb904855b22a180c8a4749b..6dd2d8a13d46647b2f2aee6d23af3403ce1c1966 100644 (file)
@@ -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;
         }
       }