diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 2a45f5379b1e34..4cabc0d740c29f 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -359,7 +359,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: