From 3a74844df02b5ecec0b96bfb8b2ff3bcdd33f7f4 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 5 Sep 2023 15:41:36 +0200 Subject: block manager: fix dir_not_empty --- src/block/layout.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/block/layout.rs b/src/block/layout.rs index b119281b..3b529fc0 100644 --- a/src/block/layout.rs +++ b/src/block/layout.rs @@ -276,8 +276,7 @@ fn dir_not_empty(path: &PathBuf) -> Result { .into_string() .ok() .and_then(|hex| hex::decode(&hex).ok()) - .map(|bytes| (2..=4).contains(&bytes.len())) - .unwrap_or(false) + .is_some() { return Ok(true); } -- cgit v1.2.3