mirror of
git://git.proxmox.com/git/pxar.git
synced 2025-01-09 05:17:38 +03:00
fix fifo and socket entry kinds in accessor
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
85f5a177ef
commit
a6e6873f70
@ -397,7 +397,18 @@ impl<I: SeqRead> DecoderImpl<I> {
|
|||||||
match self.read_next_item_or_eof().await? {
|
match self.read_next_item_or_eof().await? {
|
||||||
Some(ItemResult::Entry) => break,
|
Some(ItemResult::Entry) => break,
|
||||||
Some(ItemResult::Attribute) => continue,
|
Some(ItemResult::Attribute) => continue,
|
||||||
None if self.eof_after_entry => break,
|
None if self.eof_after_entry => {
|
||||||
|
// Single FIFOs and sockets (as received from the Accessor) won't reach a
|
||||||
|
// FILENAME/GOODBYE entry:
|
||||||
|
if self.entry.metadata.is_fifo() {
|
||||||
|
self.entry.kind = EntryKind::Fifo;
|
||||||
|
} else if self.entry.metadata.is_socket() {
|
||||||
|
self.entry.kind = EntryKind::Socket;
|
||||||
|
} else {
|
||||||
|
self.entry.kind = EntryKind::Directory;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
None => io_bail!("unexpected EOF in entry"),
|
None => io_bail!("unexpected EOF in entry"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user