src/pxar/exclude_pattern.rs: do not return partial matches for files
Partial matches make only sense for directories, files are always leafs of the tree. Take this into account in order to avoid restoring of files which only matched the front of a match pattern. Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
bdf0d82ced
commit
a771f90745
@ -174,6 +174,10 @@ impl PxarExcludePattern {
|
|||||||
res = MatchType::None;
|
res = MatchType::None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !is_dir && (res == MatchType::PartialInclude || res == MatchType::PartialExclude) {
|
||||||
|
res = MatchType::None;
|
||||||
|
}
|
||||||
|
|
||||||
res
|
res
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user