mirror of
https://github.com/xavo95/repak.git
synced 2025-01-18 10:54:38 +00:00
Pak::read should accept reference too whoops
This commit is contained in:
parent
f2c2255d53
commit
079693af22
1 changed files with 2 additions and 2 deletions
|
@ -226,13 +226,13 @@ impl<W: Write + Seek> PakWriter<W> {
|
|||
|
||||
impl Pak {
|
||||
fn read<R: Read + Seek>(
|
||||
mut reader: R,
|
||||
reader: &mut R,
|
||||
version: super::Version,
|
||||
key: Option<&aes::Aes256>,
|
||||
) -> Result<Self, super::Error> {
|
||||
// read footer to get index, encryption & compression info
|
||||
reader.seek(io::SeekFrom::End(-version.size()))?;
|
||||
let footer = super::footer::Footer::read(&mut reader, version)?;
|
||||
let footer = super::footer::Footer::read(reader, version)?;
|
||||
// read index to get all the entry info
|
||||
reader.seek(io::SeekFrom::Start(footer.index_offset))?;
|
||||
let mut index = reader.read_len(footer.index_size as usize)?;
|
||||
|
|
Loading…
Reference in a new issue