2
0
mirror of https://github.com/boostorg/log.git synced 2026-02-17 13:52:15 +00:00

Fixed incorrect matching of digits in a file name against a placeholder.

If a file name pattern ended with a placeholder, e.g. a file counter, file names
fitting that pattern would not be matched by scan_for_files, leaving such files
unmanaged.

Fixes https://github.com/boostorg/log/issues/78.
This commit is contained in:
Andrey Semashev
2019-04-14 20:14:58 +03:00
parent 4f5e669376
commit d7a87119e6
2 changed files with 10 additions and 2 deletions

View File

@@ -390,8 +390,10 @@ BOOST_LOG_ANONYMOUS_NAMESPACE {
{
for (; n > 0; --n)
{
if (it == end)
return false;
path_char_type c = *it++;
if (!traits_t::is_digit(c) || it == end)
if (!traits_t::is_digit(c))
return false;
}
return true;