mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-05 02:55:31 +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(|| {
|
||||
std::io::Error::new(std::io::ErrorKind::InvalidData, "Cannot extract file's mode")
|
||||
})?;
|
||||
let is_symlink = (mode & 0o170000) == 0o120000;
|
||||
let mode = file.unix_mode();
|
||||
let is_symlink = mode.is_some_and(|mode| mode & 0o170000 == 0o120000);
|
||||
|
||||
if is_symlink {
|
||||
let mut target = String::new();
|
||||
|
Loading…
x
Reference in New Issue
Block a user