mirror of https://github.com/python/cpython.git
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:
parent
3a806b1f05
commit
882e4761c6
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue