Skip to content

Commit

Permalink
Merge branch 'no_last_slice'
Browse files Browse the repository at this point in the history
  • Loading branch information
Edrusb committed Jul 8, 2024
2 parents 55e708a + df9e024 commit dfa11da
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/build/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ from 2.7.x to 2.8.0
- exposing build_regex_for_exclude_mask() routine in tools module (was cli
specific in line_tools module).

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.
Expand Down
8 changes: 5 additions & 3 deletions src/libdar/tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2407,13 +2407,15 @@ namespace libdar

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
Expand Down

0 comments on commit dfa11da

Please sign in to comment.