From 875d375d7a44e09f75b31bb55417b1c90476d0c9 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Tue, 23 Feb 2021 15:20:17 +0100 Subject: [PATCH] api2/types: ArchiveEntry: fix inverse 'leaf' value a 'leaf' node is every file *except* directories, so we have to reverse the logtic here this fixes the pxar.didx browser in the web ui Signed-off-by: Dominik Csapak --- src/api2/types/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api2/types/mod.rs b/src/api2/types/mod.rs index 13dba033..b72d54c1 100644 --- a/src/api2/types/mod.rs +++ b/src/api2/types/mod.rs @@ -1333,7 +1333,7 @@ impl ArchiveEntry { text: String::from_utf8_lossy(filepath.split(|x| *x == b'/').last().unwrap()) .to_string(), entry_type: CatalogEntryType::from(entry_type).to_string(), - leaf: matches!(entry_type, DirEntryAttribute::Directory { .. }), + leaf: !matches!(entry_type, DirEntryAttribute::Directory { .. }), size: match entry_type { DirEntryAttribute::File { size, .. } => Some(*size), _ => None