We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bddd96 commit 8a77f59Copy full SHA for 8a77f59
Lib/logging/handlers.py
@@ -371,8 +371,13 @@ def getFilesToDelete(self):
371
for fileName in fileNames:
372
if fileName[:plen] == prefix:
373
suffix = fileName[plen:]
374
- if self.extMatch.match(suffix):
375
- result.append(os.path.join(dirName, fileName))
+ # See bpo-45628: The date/time suffix could be anywhere in the
+ # filename
376
+ parts = suffix.split('.')
377
+ for part in parts:
378
+ if self.extMatch.match(part):
379
+ result.append(os.path.join(dirName, fileName))
380
+ break
381
if len(result) < self.backupCount:
382
result = []
383
else:
0 commit comments