mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-11-25 01:21:01 +00:00
fix blocksync not resyncing compressed blocs properly
This commit is contained in:
parent
f6f0c6f515
commit
e44bec738c
1 changed files with 9 additions and 1 deletions
|
@ -599,11 +599,19 @@ impl BlockManager {
|
|||
Err(_) => continue,
|
||||
};
|
||||
let ent_type = data_dir_ent.file_type().await?;
|
||||
let mut iter_name = name.split('.');
|
||||
let name = iter_name
|
||||
.next()
|
||||
.expect("split always contain at least one item");
|
||||
let corrupted = iter_name
|
||||
.last()
|
||||
.map(|ext| ext == "corrupted")
|
||||
.unwrap_or(false);
|
||||
|
||||
if name.len() == 2 && hex::decode(&name).is_ok() && ent_type.is_dir() {
|
||||
self.repair_aux_read_dir_rec(&data_dir_ent.path(), must_exit)
|
||||
.await?;
|
||||
} else if name.len() == 64 {
|
||||
} else if name.len() == 64 && !corrupted {
|
||||
let hash_bytes = match hex::decode(&name) {
|
||||
Ok(h) => h,
|
||||
Err(_) => continue,
|
||||
|
|
Loading…
Reference in a new issue