From 82bc0ad40c17e918c55990580f1c22ac06450382 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 12 Feb 2019 10:43:31 +0100 Subject: [PATCH] backup: fixup warnings and readd lost file type check Signed-off-by: Wolfgang Bumiller --- src/backup/chunk_store.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/backup/chunk_store.rs b/src/backup/chunk_store.rs index b60bacfd..63cd01c7 100644 --- a/src/backup/chunk_store.rs +++ b/src/backup/chunk_store.rs @@ -300,8 +300,6 @@ impl ChunkStore { let mut verbose = true; let now = unsafe { libc::time(std::ptr::null_mut()) }; - let mut last_percentage = 0; - let mut progress = 0; let iter = ChunkIterator::with_progress( base_handle, |p| eprintln!("percentage done: {}", p), @@ -322,6 +320,9 @@ impl ChunkStore { Some(file_type) => file_type, None => bail!("unsupported file system type on chunk store '{}'", self.name), }; + if file_type != nix::dir::Type::File { + continue; + } let filename = entry.file_name(); if let Ok(stat) = fstatat(dirfd, filename, nix::fcntl::AtFlags::AT_SYMLINK_NOFOLLOW) {