From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <w.bumiller@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id E118DBC17B
 for <pbs-devel@lists.proxmox.com>; Thu, 21 Dec 2023 13:11:43 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id B8586186CC
 for <pbs-devel@lists.proxmox.com>; Thu, 21 Dec 2023 13:11:13 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pbs-devel@lists.proxmox.com>; Thu, 21 Dec 2023 13:11:12 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 7693348A6C
 for <pbs-devel@lists.proxmox.com>; Thu, 21 Dec 2023 13:11:12 +0100 (CET)
Date: Thu, 21 Dec 2023 13:11:11 +0100
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Filip Schauer <f.schauer@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Message-ID: <s453pl75cudevel6hkdewhxajeccderpc6vonaes77u42egxlt@sjjwnczhzphl>
References: <20231214144824.100616-1-f.schauer@proxmox.com>
 <20231214144824.100616-3-f.schauer@proxmox.com>
 <ccc4uaslsrj67zrjeixmjwvofnqos4vuyp5e3a6niljmaovr4e@wl4dq2mjueiv>
 <086153c2-0458-409d-a241-2a2b02bbbb34@proxmox.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <086153c2-0458-409d-a241-2a2b02bbbb34@proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.095 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 T_SCC_BODY_TEXT_LINE    -0.01 -
Subject: Re: [pbs-devel] [PATCH v3 proxmox 2/3] compression: Add support for
 symlinks in zip files
X-BeenThere: pbs-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Backup Server development discussion
 <pbs-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pbs-devel/>
List-Post: <mailto:pbs-devel@lists.proxmox.com>
List-Help: <mailto:pbs-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Thu, 21 Dec 2023 12:11:43 -0000

forgot to include this in my other reply:

On Thu, Dec 21, 2023 at 12:37:42PM +0100, Filip Schauer wrote:
> On 20/12/2023 14:20, Wolfgang Bumiller wrote:
(...)
> I just thought of another way:
> 
> How about inserting the content into FileType::Regular. This would
> eliminate the need to pass None to add_entry. Therefore, it would be
> impossible to pass conflicting parameters to the function, such as
> FileType::Regular with content = None. This change would not get rid of
> the hunk you mentioned, but the code seems cleaner to me this way.

Works, too.
If FileType has a getter to just get an Option<Reader> (possibly even as
an internal `.*take*_reader()` since `add_entry` gets the full entry
by-move anyway) that part of the code can still just gets an option as
before without caring about the file mode so can otherwise stay the
same.