Merge branch 'odin' of git.hitchhiker-linux.org:jeang3nie/tar-ng into odin

This commit is contained in:
Nathan Fisher 2023-10-28 19:11:15 -04:00
commit 49f1954a57
1 changed files with 2 additions and 3 deletions

View File

@ -170,9 +170,8 @@ impl Node {
} else if kind == Kind::Pipe {
break 'blk FileType::Fifo;
} else if kind == Kind::Normal {
let mut len = meta.len();
let mut data = Vec::with_capacity(len.try_into()?);
len = reader.read_to_end(&mut data)?.try_into()?;
let mut data = vec![];
let len = reader.read_to_end(&mut data)?.try_into()?;
let checksum = match algorithm {
Algorithm::Md5 => {
let mut hasher = Md5::new();