From 8b597d256d53967745cacec471820de42f54b914 Mon Sep 17 00:00:00 2001 From: Denis Corbin Date: Mon, 8 Jul 2024 21:41:07 +0200 Subject: [PATCH 1/2] fixing excluding path masks when used with regular expression in a testing or merging operation --- src/dar_suite/line_tools.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/dar_suite/line_tools.cpp b/src/dar_suite/line_tools.cpp index a4ba5787..40498196 100644 --- a/src/dar_suite/line_tools.cpp +++ b/src/dar_suite/line_tools.cpp @@ -1614,17 +1614,19 @@ string line_tools_build_regex_for_exclude_mask(const string & prefix, string result = "^"; string::const_iterator it = prefix.begin(); - // prepending any non alpha numeric char of the root by a anti-slash + // prepending any regex specific char of the root by a anti-slash for( ; it != prefix.end() ; ++it) { - if(isalnum(*it) || *it == '/' || *it == ' ') - result += *it; - else + if(*it == '.' || *it == '?' || *it == '+' || *it == '*' || + *it == '^' || *it == '$' || *it == '[' || *it == '|' || + *it == '{' || *it == '(' || *it == ')' || *it == '\\') { result += '\\'; result += *it; } + else + result += *it; } // adding a trailing / if necessary From ae06fdc90366864d8e028e09340ab45636002f8b Mon Sep 17 00:00:00 2001 From: Denis Corbin Date: Mon, 8 Jul 2024 21:48:24 +0200 Subject: [PATCH 2/2] updating Changelog --- src/build/ChangeLog | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/build/ChangeLog b/src/build/ChangeLog index 6f8654b9..e696455d 100644 --- a/src/build/ChangeLog +++ b/src/build/ChangeLog @@ -1,3 +1,8 @@ +from 2.7.15 to 2.7.16 +- fixed mask building of path exclusion (dar's -P option) when used with + regular expression (problem met while testing or merging a backup) + +from 2.7.14 to 2.7.15 - updating libdar about CURLINFO_CONTENT_LENGTH_DOWNLOAD symbol which is reported as deprecated by recent libcurl libraries. - fixed compilation problem under MacOS Mojave @@ -11,20 +16,6 @@ the end of closing sftp session (undocumented changed behavior in libcurl). -from 2.7.14 to 2.7.15 -- updating libdar about CURLINFO_CONTENT_LENGTH_DOWNLOAD symbol which is - reported as deprecated by recent libcurl libraries. -- fixed compilation problem under MacOS Mojave -- fixed bug that lead the warning about a backup operation about to save - the backup itslef, to not show -- removing obsolete call to gcry_control(GCRYCTL_ENABLE_M_GUARD) while - initializing libgcrypt. This lead to libgcrypt initialization to fail - with libgcrypt 1.11 and more recent versions. -- fixed display bug about present but unsaved FSA status while listing -- fixed dead-lock condition in libdar when used with libcurl > 0.74.0 at - the end of closing sftp session (undocumented changed behavior in - libcurl). - from 2.7.13 to 2.7.14 - adding safe guard in fichier_libcurl destructor to verify all data have been passed to libcurl *and* libcurl has completed the writing operation