From d73f40c8f257d8d7adf6fa06c3a914e257f113d3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 25 Nov 2019 14:09:47 +0000 Subject: [PATCH] Remove any hash from cached post id --- utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index e9f85020..76ad9635 100644 --- a/utils.py +++ b/utils.py @@ -449,7 +449,10 @@ def getCachedPostFilename(baseDir: str,nickname: str,domain: str, \ """ cachedPostFilename= \ getCachedPostDirectory(baseDir,nickname,domain)+ \ - '/'+postJsonObject['id'].replace('/activity','').replace('/','#')+'.html' + '/'+postJsonObject['id'].replace('/activity','') + if '#' in cachedPostFilename: + cachedPostFilename=cachedPostFilename.split('#',1)[0] + cachedPostFilename=cachedPostFilename.replace('/','#')+'.html' return cachedPostFilename def removePostFromCache(postJsonObject: {},recentPostsCache: {}):