fix returning outer pbnode when empty inner
This commit is contained in:
parent
0aca44906e
commit
7043fe2543
@ -98,7 +98,7 @@ impl<'a> FlatUnixFs<'a> {
|
||||
let data = match node.Data {
|
||||
Some(Cow::Borrowed(bytes)) if !bytes.is_empty() => Some(bytes),
|
||||
Some(Cow::Owned(_)) => unreachable!(),
|
||||
Some(Cow::Borrowed(_)) | None => return Err((UnixFsReadFailed::NoData, None)),
|
||||
Some(Cow::Borrowed(_)) | None => return Err((UnixFsReadFailed::NoData, Some(node))),
|
||||
};
|
||||
|
||||
match UnixFs::try_from(data) {
|
||||
|
Loading…
Reference in New Issue
Block a user