catar: encode/decode sockets and fifos

This commit is contained in:
Dietmar Maurer
2019-01-11 13:26:05 +01:00
parent 20e2043a08
commit 490683ec93
2 changed files with 48 additions and 2 deletions

View File

@ -317,6 +317,8 @@ impl <'a, W: Write> CaTarEncoder<'a, W> {
}
} else if (ifmt == libc::S_IFBLK) || (ifmt == libc::S_IFCHR) {
self.encode_device(&stat)?;
} else if (ifmt == libc::S_IFIFO) || (ifmt == libc::S_IFSOCK) {
// nothing do do - entry already contains all information
} else {
bail!("unsupported file type (mode {:o} {:?})", stat.st_mode, self.current_path);
}