From e0ec134810a0820cb1cb4ce96cd2ad675b12f8a3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 9 Oct 2020 13:57:45 +0100 Subject: [PATCH] Delete arrived files --- utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils.py b/utils.py index 4ae804dd..68f207f8 100644 --- a/utils.py +++ b/utils.py @@ -712,6 +712,11 @@ def deletePost(baseDir: str, httpPrefix: str, if os.path.isfile(votesFilename): os.remove(votesFilename) + # remove any arrived file + arrivedFilename = postFilename + '.arrived' + if os.path.isfile(arrivedFilename): + os.remove(arrivedFilename) + # remove cached html version of the post cachedPostFilename = \ getCachedPostFilename(baseDir, nickname, domain, postJsonObject)