From 092be5c5c542532d01149e69304a3e13fb4a1843 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 6 Oct 2020 22:00:53 +0100 Subject: [PATCH] Remove votes file if post is deleted --- utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils.py b/utils.py index a8aa5416f..59124cd8f 100644 --- a/utils.py +++ b/utils.py @@ -633,10 +633,10 @@ def deletePost(baseDir: str, httpPrefix: str, if os.path.isfile(muteFilename): os.remove(muteFilename) - # remove any moderation file - moderationFilename = postFilename + '.moderate' - if os.path.isfile(moderationFilename): - os.remove(moderationFilename) + # remove any votes file + votesFilename = postFilename + '.votes' + if os.path.isfile(votesFilename): + os.remove(votesFilename) # remove cached html version of the post cachedPostFilename = \