bpo-44753: Don't use logfile extension when determining old files to be deleted (GH-27475) (GH-27486)

(cherry picked from commit 6ff8903809)
This commit is contained in:
Miss Islington (bot) 2021-07-30 09:20:24 -07:00 committed by GitHub
parent 3a806b1f05
commit 882e4761c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -356,7 +356,8 @@ def getFilesToDelete(self):
dirName, baseName = os.path.split(self.baseFilename)
fileNames = os.listdir(dirName)
result = []
prefix = baseName + "."
# See bpo-44753: Don't use the extension when computing the prefix.
prefix = os.path.splitext(baseName)[0] + "."
plen = len(prefix)
for fileName in fileNames:
if fileName[:plen] == prefix: