Fix cache filename

merge-requests/8/head
Bob Mottram 2020-10-18 20:41:18 +01:00
parent 0bbede6a83
commit dcf34cd3c2
1 changed files with 2 additions and 2 deletions

View File

@ -591,14 +591,14 @@ def clearFromPostCaches(baseDir: str, postId: str) -> None:
"""Clears cached html for the given post, so that edits
to news will appear
"""
filename = postId + '.html'
filename = '/postcache/' + postId + '.html'
for subdir, dirs, files in os.walk(baseDir + '/accounts'):
for acct in dirs:
if '@' not in acct:
continue
if 'inbox@' in acct:
continue
cacheDir = os.path.join(baseDir + '/accounts/postcache', acct)
cacheDir = os.path.join(baseDir + '/accounts', acct)
postFilename = cacheDir + filename
print('clearFromPostCaches: ' + postFilename)
if os.path.isfile(postFilename):