diff --git a/src/main.rs b/src/main.rs index 3256209..a5d5a1a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,7 +61,7 @@ pub enum Error { StripPrefix(#[from] ::std::path::StripPrefixError), #[error("{0} is not a directory")] NotDir(PathBuf), - #[error("output file path already exists: {0}")] + #[error("output path already exists: {0}")] OutputPathExists(PathBuf), #[error("{0} has invalid unicode")] InvalidUnicode(PathBuf), @@ -75,6 +75,8 @@ pub enum Error { InvalidFileFlags(i32), #[error("utf16 error {0}")] Utf16Error(String), + #[error("parten file path does not exists: {0}")] + ParentPathDoesNotExist(PathBuf), } impl From>> for Error { @@ -207,6 +209,9 @@ fn unpack_archive(iro_path: PathBuf, output_path: Option) -> Result) -> Result) -> Result Result { let bytes_u16 = path_bytes .chunks(2) - .map(|e| e.try_into().map(u16::from_be_bytes)) + .map(|e| e.try_into().map(u16::from_le_bytes)) .collect::, _>>() .map_err(|_| Error::Utf16Error("uneven bytes".to_owned()))?;