Delete arrived files

merge-requests/8/head
Bob Mottram 2020-10-09 13:57:45 +01:00
parent 513d0784e4
commit e0ec134810
1 changed files with 5 additions and 0 deletions

View File

@ -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)