We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4d2b34 commit 3f723cfCopy full SHA for 3f723cf
src/archive.rs
@@ -101,6 +101,7 @@ pub enum FileType {
101
NamedPipe,
102
Mount,
103
RegularFile,
104
+ Unknown,
105
}
106
107
pub trait Handle {
@@ -134,6 +135,7 @@ pub trait Entry {
134
135
ffi::AE_IFMT => FileType::Mount,
136
ffi::AE_IFREG => FileType::RegularFile,
137
ffi::AE_IFSOCK => FileType::Socket,
138
+ 0 => FileType::Unknown,
139
code => unreachable!("undefined filetype: {}", code),
140
141
@@ -184,6 +186,7 @@ pub trait Entry {
184
186
FileType::Mount => ffi::AE_IFMT,
185
187
FileType::RegularFile => ffi::AE_IFREG,
188
FileType::Socket => ffi::AE_IFSOCK,
189
+ FileType::Unknown => 0,
190
};
191
ffi::archive_entry_set_filetype(self.entry(), file_type);
192
0 commit comments