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: {}):