mirror of
https://github.com/python/cpython.git
synced 2024-11-24 10:24:35 +08:00
bpo-44753: Don't use logfile extension when determining old files to be deleted (GH-27475)
This commit is contained in:
parent
aaa83cdfab
commit
6ff8903809
@ -359,7 +359,8 @@ class TimedRotatingFileHandler(BaseRotatingHandler):
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user