[pbs-devel] [PATCH vma-to-pbs 2/4] add support for bulk import of a dump directory
Filip Schauer
f.schauer at proxmox.com
Tue Oct 8 16:36:59 CEST 2024
Superseded by:
https://lists.proxmox.com/pipermail/pbs-devel/2024-October/010934.html
On 04/09/2024 11:14, Fabian Grünbichler wrote:
>> + let compression = match ext.as_str() {
>> + "" => None,
>> + ".zst" => Some(Compression::Zstd),
>> + ".lzo" => Some(Compression::Lzo),
>> + ".gz" => Some(Compression::GZip),
>> + _ => continue,
>> + };
> this could move to a FromStr on Compression?
In this case, this would make it less readable, since this is an
`Option<Compression>`. I could add a `Compression::Uncompressed`, but
that would complicate the `match &backup_args.compression` in
vma2pbs.rs:upload_vma_file.
On 04/09/2024 11:14, Fabian Grünbichler wrote:
>> + let mut notes_path_os_string: OsString = path.into();
>> + notes_path_os_string.push(".notes");
>> + let notes_path: PathBuf = notes_path_os_string.into();
> these three lines could become
>
> let notes_path = path.join(".notes");
This does not do the same thing. `.join(".notes")` would add "/.notes"
to the path.
More information about the pbs-devel
mailing list