diff options
author | Kenneth Skovhede <kenneth@hexad.dk> | 2019-10-31 23:16:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-31 23:16:45 +0300 |
commit | 6a576da2ecf34dedefa271ce4e27fc5c0dcbd69b (patch) | |
tree | e72afb30f428812dffb75f024b0dc36cc544afea | |
parent | 59ddeec459413ae86a5e35e7ead4c3acaec6e391 (diff) | |
parent | 1f1826bf7a8b2a97956d001677ce0ecf917df047 (diff) |
Merge pull request #3967 from duplicati/feature/fix_exclude_regexp
Possible fix for issue #2220
-rw-r--r-- | Duplicati/Server/webroot/ngax/scripts/services/AppUtils.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Duplicati/Server/webroot/ngax/scripts/services/AppUtils.js b/Duplicati/Server/webroot/ngax/scripts/services/AppUtils.js index e6ac393fe..728d1456a 100644 --- a/Duplicati/Server/webroot/ngax/scripts/services/AppUtils.js +++ b/Duplicati/Server/webroot/ngax/scripts/services/AppUtils.js @@ -131,8 +131,8 @@ backupApp.service('AppUtils', function($rootScope, $timeout, $cookies, DialogSer name: gettextCatalog.getString('Exclude files whose names contain'), key: '-file*', prefix: '-[.*', - suffix: '.*[^!]]', - rx: '\\-\\[\\.\\*([^\\!]+)\\.\\*\\[\\^\\!\\]\\]' + suffix: '[^!]*]', + rx: '\\-\\[\\.\\*[\\^\\!\\]\\*\\]' }, { name: gettextCatalog.getString('Exclude folder'), key: '-folder', @@ -545,6 +545,10 @@ backupApp.service('AppUtils', function($rootScope, $timeout, $cookies, DialogSer } function matches(txt, n) { + // We need to escape dirsep if it is the backslash character + if (dirsep == '\\') + dirsep = '\\\\'; + var pre = apputils.replace_all(n.prefix || '', '!', dirsep); var suf = apputils.replace_all(n.suffix || '', '!', dirsep); @@ -583,6 +587,10 @@ backupApp.service('AppUtils', function($rootScope, $timeout, $cookies, DialogSer body = body || ''; + // We need to escape dirsep if it is the backslash character + if (dirsep == '\\') + dirsep = '\\\\'; + var f = this.filterTypeMap[type]; var pre = this.replace_all(f.prefix || '', '!', dirsep); var suf = this.replace_all(f.suffix || '', '!', dirsep); |