{"action":"created","issue":{"url":"https://api.github.com/repos/duplicati/duplicati/issues/2220","repository_url":"https://api.github.com/repos/duplicati/duplicati","labels_url":"https://api.github.com/repos/duplicati/duplicati/issues/2220/labels{/name}","comments_url":"https://api.github.com/repos/duplicati/duplicati/issues/2220/comments","events_url":"https://api.github.com/repos/duplicati/duplicati/issues/2220/events","html_url":"https://github.com/duplicati/duplicati/issues/2220","id":198210568,"node_id":"MDU6SXNzdWUxOTgyMTA1Njg=","number":2220,"title":"\"Exclude files whose names contain\" causes error","user":{"login":"downpoured","id":3194829,"node_id":"MDQ6VXNlcjMxOTQ4Mjk=","avatar_url":"https://avatars0.githubusercontent.com/u/3194829?v=4","gravatar_id":"","url":"https://api.github.com/users/downpoured","html_url":"https://github.com/downpoured","followers_url":"https://api.github.com/users/downpoured/followers","following_url":"https://api.github.com/users/downpoured/following{/other_user}","gists_url":"https://api.github.com/users/downpoured/gists{/gist_id}","starred_url":"https://api.github.com/users/downpoured/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/downpoured/subscriptions","organizations_url":"https://api.github.com/users/downpoured/orgs","repos_url":"https://api.github.com/users/downpoured/repos","events_url":"https://api.github.com/users/downpoured/events{/privacy}","received_events_url":"https://api.github.com/users/downpoured/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-31T01:08:07Z","updated_at":"2018-09-14T13:52:16Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nI'm seeing an error message when I try to use a \"Exclude files whose names contain\" filter.\r\n\r\n### Version info\r\n<!-- please replace the examples with your info -->\r\n**Duplicati Version:** both 2.0.1.35 and github latest (e1a989ca3...)\r\n**Operating System:** Win 8.1 x64\r\n**Backend:** any\r\n\r\n### Steps to reproduce\r\n- Start duplicati.server.exe\r\n- From the web interface,\r\n- Menu->Add backup\r\n- Enter a name, choose \"No encryption\"\r\n- Choose a local folder path destination\r\n- Use \"Add a path directly\" to provide a source path, include trailing \\.\r\n- Add filter of type\r\n- \"Exclude files whose names contain\" and value \"example\"\r\n- Click next, using default settings for all other settings.\r\n- Click Run Now.\r\n\r\n**Actual result:**\r\n\r\nA red error immediately appears saying:\r\n\r\n    Error while running simple-test-exclude\r\n    parsing \".*example.*[^\\]\" - Unterminated [] set.\r\n\r\nHere are the command line arguments that were created\r\n\r\n    \"...\\Duplicati.CommandLine.exe\" backup \"file://C:\\testduplic\\simpletestexcludes\" \"C:\\testduplic\\testexcludes--input\\\\\" --backup-name=\"simple-test-exclude\" --dbpath=\"C:\\...\\Duplicati\\Server\\bin\\Debug\\OXXLAXDONK.sqlite\" --encryption-module= --compression-module=\"zip\" --dblock-size=\"50mb\" --keep-time=\"3M\" --no-encryption=\"true\" --disable-module=\"console-password-input\" --exclude=\"[.*example.*[^\\]]\"\r\n\r\nI did look at AppUtils.js to investigate. Problem looks straightforward, the dirsep character \\ is inadvertently escaping the ]. I would also have expected the generated regex to look something like\r\n\r\n    .*example[^!]*\r\n\r\n(using AppUtils.js's convention that ! is replaced with dirsep)\r\n\r\nI am able to work around this by using a raw regular expression but thought I would notify that this feature doesn't seem to be working as intended,\r\n\r\n\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40512773-exclude-files-whose-names-contain-causes-error?utm_campaign=plugin&utm_content=tracker%2F4870652&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F4870652&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/duplicati/duplicati/issues/comments/421365254","html_url":"https://github.com/duplicati/duplicati/issues/2220#issuecomment-421365254","issue_url":"https://api.github.com/repos/duplicati/duplicati/issues/2220","id":421365254,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTM2NTI1NA==","user":{"login":"ts678","id":40771998,"node_id":"MDQ6VXNlcjQwNzcxOTk4","avatar_url":"https://avatars3.githubusercontent.com/u/40771998?v=4","gravatar_id":"","url":"https://api.github.com/users/ts678","html_url":"https://github.com/ts678","followers_url":"https://api.github.com/users/ts678/followers","following_url":"https://api.github.com/users/ts678/following{/other_user}","gists_url":"https://api.github.com/users/ts678/gists{/gist_id}","starred_url":"https://api.github.com/users/ts678/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ts678/subscriptions","organizations_url":"https://api.github.com/users/ts678/orgs","repos_url":"https://api.github.com/users/ts678/repos","events_url":"https://api.github.com/users/ts678/events{/privacy}","received_events_url":"https://api.github.com/users/ts678/received_events","type":"User","site_admin":false},"created_at":"2018-09-14T13:52:16Z","updated_at":"2018-09-14T13:52:16Z","author_association":"NONE","body":"Some forum discussion was in [A bug on regular expression when creating filters (Windows platform)](https://forum.duplicati.com/t/a-bug-on-regular-expression-when-creating-filters-windows-platform/4543?u=ts678) with reference citations and a proposed one-character fix, but it would of course need multi-platform testing."}}
{"actor":{"display_login":"ts678"}}