mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-06 19:45:29 +00:00
Fix Zip crash when file mode isn't present
This commit is contained in:
parent
739dfa9507
commit
5d646e2530
@ -85,10 +85,8 @@ where
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
let mode = file.unix_mode().ok_or_else(|| {
|
let mode = file.unix_mode();
|
||||||
std::io::Error::new(std::io::ErrorKind::InvalidData, "Cannot extract file's mode")
|
let is_symlink = mode.is_some_and(|mode| mode & 0o170000 == 0o120000);
|
||||||
})?;
|
|
||||||
let is_symlink = (mode & 0o170000) == 0o120000;
|
|
||||||
|
|
||||||
if is_symlink {
|
if is_symlink {
|
||||||
let mut target = String::new();
|
let mut target = String::new();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user