pxar: cleanup: refactor and rename exclude pattern
The original name PxarExcludePattern makes no sense anymore as the patterns are also used to match filenames during restore of the archive. Therefore, exclude_pattern.rs is moved to match_pattern.rs and PxarExcludePattern rename to MatchPattern. Further, since it makes more sense the MatchTypes are now declared as None, Positive, Negative, PartialPositive or PartialNegative, as this makes more sense and seems more readable. Positive matches are those without '!' prefix, Negatives with '!' prefix. This makes also the filename matching in the encoder/decoder more intuitive and the logic was adapted accordingly. Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
fe076c8259
commit
4d142ea79e
@ -65,8 +65,8 @@ pub use sequential_decoder::*;
|
||||
mod decoder;
|
||||
pub use decoder::*;
|
||||
|
||||
mod exclude_pattern;
|
||||
pub use exclude_pattern::*;
|
||||
mod match_pattern;
|
||||
pub use match_pattern::*;
|
||||
|
||||
mod dir_stack;
|
||||
pub use dir_stack::*;
|
||||
|
Reference in New Issue
Block a user