diff options
author | Alex Auvolat <alex@adnab.me> | 2023-09-05 15:41:36 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-09-06 16:35:28 +0200 |
commit | 3a74844df02b5ecec0b96bfb8b2ff3bcdd33f7f4 (patch) | |
tree | 7d42c100fbf610aa8183cb207f5e3f7e40448165 /src/block | |
parent | 93114a9747cefa441ebd274f206c09699d051b39 (diff) | |
download | garage-3a74844df02b5ecec0b96bfb8b2ff3bcdd33f7f4.tar.gz garage-3a74844df02b5ecec0b96bfb8b2ff3bcdd33f7f4.zip |
block manager: fix dir_not_empty
Diffstat (limited to 'src/block')
-rw-r--r-- | src/block/layout.rs | 3 |
1 files changed, 1 insertions, 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<bool, Error> { .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); } |