pxar: create .pxarexclude-cli file
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@ -275,16 +275,16 @@ fn create_archive(
|
||||
exclude: Option<Vec<String>>,
|
||||
entries_max: isize,
|
||||
) -> Result<(), Error> {
|
||||
let exclude_list = {
|
||||
let pattern_list = {
|
||||
let input = exclude.unwrap_or_else(Vec::new);
|
||||
let mut exclude = Vec::with_capacity(input.len());
|
||||
let mut pattern_list = Vec::with_capacity(input.len());
|
||||
for entry in input {
|
||||
exclude.push(
|
||||
pattern_list.push(
|
||||
MatchEntry::parse_pattern(entry, PatternFlag::PATH_NAME, MatchType::Exclude)
|
||||
.map_err(|err| format_err!("error in exclude pattern: {}", err))?,
|
||||
);
|
||||
}
|
||||
exclude
|
||||
pattern_list
|
||||
};
|
||||
|
||||
let device_set = if all_file_systems {
|
||||
@ -332,7 +332,7 @@ fn create_archive(
|
||||
proxmox_backup::pxar::create_archive(
|
||||
dir,
|
||||
writer,
|
||||
exclude_list,
|
||||
pattern_list,
|
||||
feature_flags,
|
||||
device_set,
|
||||
true,
|
||||
|
Reference in New Issue
Block a user