From 8f826a1ac51cfd0c3fefc47e0f9e510be547cb52 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 20 Oct 2019 12:21:09 +0100 Subject: [PATCH] Tidying --- inbox.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/inbox.py b/inbox.py index e4936a890..2a6b7b221 100644 --- a/inbox.py +++ b/inbox.py @@ -1509,11 +1509,12 @@ def inboxUpdateIndex(baseDir: str,handle: str,destinationFilename: str,debug: bo """Updates the index of received posts The new entry is added to the top of the file """ - indexFilename=baseDir+'/accounts/'+handle+'/inbox.index' + boxname='inbox' + indexFilename=baseDir+'/accounts/'+handle+'/'+boxname+'.index' if debug: print('DEBUG: Updating index '+indexFilename) - if '/index/' in destinationFilename: - destinationFilename=destinationFilename.split('/index/')[1] + if '/'+boxname+'/' in destinationFilename: + destinationFilename=destinationFilename.split('/'+boxname+'/')[1] if os.path.isfile(indexFilename): with open(indexFilename, 'r+') as indexFile: content = indexFile.read()