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 authored and Dietmar Maurer committed 2019-07-17 09:44:06 +02:00
1 parent bdf0d82ced
commit a771f90745
1 file changed
+4
+4
View File
@@ -174,6 +174,10 @@ impl PxarExcludePattern {
res = MatchType::None;
}
if !is_dir && (res == MatchType::PartialInclude || res == MatchType::PartialExclude) {
res = MatchType::None;
}
res
}
}