catalog: fix issue with DirEntry start
start has to be the parent start - offset Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
780dd2b0a1
commit
b423958d8e
|
@ -440,7 +440,7 @@ impl <R: Read + Seek> CatalogReader<R> {
|
||||||
let mut entry_list = Vec::new();
|
let mut entry_list = Vec::new();
|
||||||
|
|
||||||
DirInfo::parse(&data, |etype, name, offset, size, mtime| {
|
DirInfo::parse(&data, |etype, name, offset, size, mtime| {
|
||||||
let entry = DirEntry::new(etype, name.to_vec(), offset, size, mtime);
|
let entry = DirEntry::new(etype, name.to_vec(), start - offset, size, mtime);
|
||||||
entry_list.push(entry);
|
entry_list.push(entry);
|
||||||
Ok(true)
|
Ok(true)
|
||||||
})?;
|
})?;
|
||||||
|
@ -468,7 +468,7 @@ impl <R: Read + Seek> CatalogReader<R> {
|
||||||
return Ok(true);
|
return Ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
let entry = DirEntry::new(etype, name.to_vec(), offset, size, mtime);
|
let entry = DirEntry::new(etype, name.to_vec(), start - offset, size, mtime);
|
||||||
item = Some(entry);
|
item = Some(entry);
|
||||||
Ok(false) // stop parsing
|
Ok(false) // stop parsing
|
||||||
})?;
|
})?;
|
||||||
|
|
Loading…
Reference in New Issue