diff --git a/src/node.rs b/src/node.rs index ff044cd..ef0ffae 100644 --- a/src/node.rs +++ b/src/node.rs @@ -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();