borg icon indicating copy to clipboard operation
borg copied to clipboard

Feature request: match path type (folder/file) with regex

Open c0d3z3r0 opened this issue 9 years ago • 4 comments

Adding 'enhancement' label based on user approval. Existing labels are kept for issue #939.

c0d3z3r0 avatar Apr 18 '16 15:04 c0d3z3r0

Well, what you describe in first paragraph is not necessarily a bug or anything unexpected. "/" is the separator and only there if there is something after it to separate. Only exception: "/" (root directory).

In general, changes of matching behaviour are problematic: some peoples backups will change behaviour, things may go wrong.

ThomasWaldmann avatar Apr 19 '16 11:04 ThomasWaldmann

there could be a new type of matcher that ensures tailing slashes for folders in regex matches

RonnyPfannschmidt avatar Apr 19 '16 12:04 RonnyPfannschmidt

Hmm... maybe not a complete new matcher but what about matcher options like "re:d:^/blah/blah/" where d means "differentiate between files and dirs"?

c0d3z3r0 avatar Apr 20 '16 09:04 c0d3z3r0

there are no matcher options, so a new matcher type ^^ also the pre behaviour is new (after all it needs to ensure the folder prefix)

RonnyPfannschmidt avatar Apr 20 '16 09:04 RonnyPfannschmidt