Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommandLine test-filters fails on RegExp pipe (or-function) on linux #3891

Closed
arberg opened this issue Sep 5, 2019 · 3 comments

Comments

@arberg
Copy link

commented Sep 5, 2019

  • [X ] I have searched open and closed issues for duplicates.

Environment info

  • Duplicati version: 2.0.4.23_beta_2019-07-14
  • Operating system: Linux docker, linuxserver

Description

Commandline regExp fails to match if it contains the selection group with |, for example (x|y)

Steps to reproduce

All of the command examples below are identical except the ending in the regExp.

  • This matches /mnt/user/media/TestDuplicati/A/
    docker exec duplicati mono /app/duplicati/Duplicati.CommandLine.exe test-filters /mnt/user/media/TestDuplicati/ --exclude='[/mnt/user/media/Test(A)/]'

  • This does not (where we now have (A|A)
    docker exec duplicati mono /app/duplicati/Duplicati.CommandLine.exe test-filters /mnt/user/media/TestDuplicati/ --exclude='[/mnt/user/media/Test(A|A)/]'

Interestingly this
docker exec duplicati mono /app/duplicati/Duplicati.CommandLine.exe test-filters /mnt/user/media/TestDuplicati/ --exclude='[/mnt/user/media/TestDuplicati/(A\|Test1)/]'

gives the output

Including path as no filters matched: /mnt/user/media/TestDuplicati/A/
Excluding path due to filter: /mnt/user/media/TestDuplicati/Test1/ => ([/mnt/user/media/TestDuplicati/(A\\|Test1)/])

which hints that the other problem might be some escaping. The above should not have excluded Test1, as it should match (I think) the folder name 'A|Test1'.

UI

Entering filters with (A|B) in UI works as expected.

Docs

I have commented about it in the docs here: https://github.com/duplicati/duplicati/wiki/How-do-filters-work%3F

@ts678

This comment has been minimized.

Copy link
Contributor

commented Sep 6, 2019

Bug Regular Expression Filter operator ‘|’ (or) does not work inside parenthesis () supports a theory of a general command line escaping issue, with possible workaround of disabling autoupdater mechanism.

@arberg

This comment has been minimized.

Copy link
Author

commented Sep 10, 2019

Identical (earlier) issue: #3135

@warwickmm

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2019

Fixed in pull request #3911.

@warwickmm warwickmm closed this Sep 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.