mirror of
https://github.com/xavo95/repak.git
synced 2025-01-18 19:04:07 +00:00
Fix error reporting wrong version
This commit is contained in:
parent
03358df460
commit
d4a56617f8
2 changed files with 4 additions and 4 deletions
|
@ -23,8 +23,8 @@ pub enum Error {
|
||||||
Magic(u32),
|
Magic(u32),
|
||||||
#[error("used version {used} but pak is version {version}")]
|
#[error("used version {used} but pak is version {version}")]
|
||||||
Version {
|
Version {
|
||||||
used: super::Version,
|
used: super::VersionMajor,
|
||||||
version: super::Version,
|
version: super::VersionMajor,
|
||||||
},
|
},
|
||||||
#[error("pak is encrypted but no key was provided")]
|
#[error("pak is encrypted but no key was provided")]
|
||||||
Encrypted,
|
Encrypted,
|
||||||
|
|
|
@ -62,8 +62,8 @@ impl Footer {
|
||||||
}
|
}
|
||||||
if version.version_major() != footer.version_major {
|
if version.version_major() != footer.version_major {
|
||||||
return Err(super::Error::Version {
|
return Err(super::Error::Version {
|
||||||
used: version,
|
used: version.version_major(),
|
||||||
version: footer.version,
|
version: footer.version_major,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Ok(footer)
|
Ok(footer)
|
||||||
|
|
Loading…
Reference in a new issue