diff options
Diffstat (limited to 'src/zip/error.rs')
| -rw-r--r-- | src/zip/error.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/zip/error.rs b/src/zip/error.rs index 1c5527c..d82de78 100644 --- a/src/zip/error.rs +++ b/src/zip/error.rs | |||
| @@ -8,6 +8,7 @@ pub type ZipResult<T> = ArchiveResult<T, ZipError>; | |||
| 8 | pub enum ZipError { | 8 | pub enum ZipError { |
| 9 | EOCDRNotFound, | 9 | EOCDRNotFound, |
| 10 | InvalidEOCDR64Signature, | 10 | InvalidEOCDR64Signature, |
| 11 | InvalidFileHeaderSignature, | ||
| 11 | InvalidCDRSignature, | 12 | InvalidCDRSignature, |
| 12 | 13 | ||
| 13 | InvalidArchiveComment, | 14 | InvalidArchiveComment, |
| @@ -17,6 +18,8 @@ pub enum ZipError { | |||
| 17 | InvalidTime, | 18 | InvalidTime, |
| 18 | InvalidFileName, | 19 | InvalidFileName, |
| 19 | InvalidFileComment, | 20 | InvalidFileComment, |
| 21 | |||
| 22 | NegativeFileOffset, | ||
| 20 | } | 23 | } |
| 21 | 24 | ||
| 22 | impl From<ZipError> for ArchiveError<ZipError> { | 25 | impl From<ZipError> for ArchiveError<ZipError> { |
| @@ -38,6 +41,9 @@ impl Display for ZipError { | |||
| 38 | "Invalid signature of zip64 end of central directory record" | 41 | "Invalid signature of zip64 end of central directory record" |
| 39 | ) | 42 | ) |
| 40 | } | 43 | } |
| 44 | Self::InvalidFileHeaderSignature => { | ||
| 45 | write!(f, "Invalid file header signature") | ||
| 46 | } | ||
| 41 | Self::InvalidCDRSignature => { | 47 | Self::InvalidCDRSignature => { |
| 42 | write!(f, "Invalid signature of central directory record") | 48 | write!(f, "Invalid signature of central directory record") |
| 43 | } | 49 | } |
| @@ -49,6 +55,8 @@ impl Display for ZipError { | |||
| 49 | Self::InvalidTime => write!(f, "Invalid time"), | 55 | Self::InvalidTime => write!(f, "Invalid time"), |
| 50 | Self::InvalidFileName => write!(f, "Invalid file name"), | 56 | Self::InvalidFileName => write!(f, "Invalid file name"), |
| 51 | Self::InvalidFileComment => write!(f, "Invalid file comment"), | 57 | Self::InvalidFileComment => write!(f, "Invalid file comment"), |
| 58 | |||
| 59 | Self::NegativeFileOffset => write!(f, "Negative file offset"), | ||
| 52 | } | 60 | } |
| 53 | } | 61 | } |
| 54 | } | 62 | } |
