From 8877202ac15d96099742ec7787cd01812f13595b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 2 Sep 2019 17:23:03 +0100 Subject: [PATCH] Locate within announce cache --- utils.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/utils.py b/utils.py index 7a2aeadb..bc6f8f4c 100644 --- a/utils.py +++ b/utils.py @@ -170,16 +170,19 @@ def locatePost(baseDir: str,nickname: str,domain: str,postUrl: str,replies=False # if this post in the shared inbox? handle='inbox@'+domain boxName='inbox' - postFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+boxName+'/'+postUrl.replace('/','#')+'.'+extension + postUrl=postUrl.replace('/','#') + postFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+boxName+'/'+postUrl+'.'+extension if not os.path.isfile(postFilename): boxName='outbox' - postFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+boxName+'/'+postUrl.replace('/','#')+'.'+extension + postFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+boxName+'/'+postUrl+'.'+extension if not os.path.isfile(postFilename): # if this post in the inbox of the person? boxName='inbox' - postFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+boxName+'/'+postUrl.replace('/','#')+'.'+extension + postFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+boxName+'/'+postUrl+'.'+extension if not os.path.isfile(postFilename): - postFilename=None + postFilename=baseDir+'/cache/announce/'+nickname+'/'+postUrl+'.'+extension + if not os.path.isfile(postFilename): + postFilename=None return postFilename def removeAttachment(baseDir: str,httpPrefix: str,domain: str,postJson: {}):