We should return the full filename path when we don't have a match on
the third group of the regex.
Signed-off-by: David Negreira <david.negreira(a)canonical.com>
---
src/logging/log_cleaner.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/logging/log_cleaner.c b/src/logging/log_cleaner.c
index 4ee91843aa..d8e6ce9cdd 100644
--- a/src/logging/log_cleaner.c
+++ b/src/logging/log_cleaner.c
@@ -82,7 +82,7 @@ virLogCleanerParseFilename(const char *path,
*rotated_index = 0;
rotated_index_str = g_match_info_fetch(matchInfo, 3);
- if (!rotated_index_str)
+ if (rotated_index_str)
return chain_prefix;
if (virStrToLong_i(rotated_index_str, NULL, 10, rotated_index) < 0) {
--
2.40.1