[pbs-devel] [PATCH v3 proxmox 2/3] compression: Add support for symlinks in zip files
Wolfgang Bumiller
w.bumiller at proxmox.com
Thu Dec 21 13:11:11 CET 2023
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.
More information about the pbs-devel
mailing list