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:
Christian Ebner 2019-07-16 13:19:47 +02:00 committed by Dietmar Maurer
parent bdf0d82ced
commit a771f90745

View File

@ -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
} }
} }