all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] api2/types: ArchiveEntry: fix inverse 'leaf' value
@ 2021-02-23 14:20 Dominik Csapak
  2021-02-23 16:24 ` [pbs-devel] applied: " Dietmar Maurer
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2021-02-23 14:20 UTC (permalink / raw)
  To: pbs-devel

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 <d.csapak@proxmox.com>
---
 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
-- 
2.20.1





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pbs-devel] applied: [PATCH proxmox-backup] api2/types: ArchiveEntry: fix inverse 'leaf' value
  2021-02-23 14:20 [pbs-devel] [PATCH proxmox-backup] api2/types: ArchiveEntry: fix inverse 'leaf' value Dominik Csapak
@ 2021-02-23 16:24 ` Dietmar Maurer
  0 siblings, 0 replies; 2+ messages in thread
From: Dietmar Maurer @ 2021-02-23 16:24 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Dominik Csapak

applied




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-23 16:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 14:20 [pbs-devel] [PATCH proxmox-backup] api2/types: ArchiveEntry: fix inverse 'leaf' value Dominik Csapak
2021-02-23 16:24 ` [pbs-devel] applied: " Dietmar Maurer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal