mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
079c5003f6
commit
8f826a1ac5
7
inbox.py
7
inbox.py
|
@ -1509,11 +1509,12 @@ def inboxUpdateIndex(baseDir: str,handle: str,destinationFilename: str,debug: bo
|
||||||
"""Updates the index of received posts
|
"""Updates the index of received posts
|
||||||
The new entry is added to the top of the file
|
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:
|
if debug:
|
||||||
print('DEBUG: Updating index '+indexFilename)
|
print('DEBUG: Updating index '+indexFilename)
|
||||||
if '/index/' in destinationFilename:
|
if '/'+boxname+'/' in destinationFilename:
|
||||||
destinationFilename=destinationFilename.split('/index/')[1]
|
destinationFilename=destinationFilename.split('/'+boxname+'/')[1]
|
||||||
if os.path.isfile(indexFilename):
|
if os.path.isfile(indexFilename):
|
||||||
with open(indexFilename, 'r+') as indexFile:
|
with open(indexFilename, 'r+') as indexFile:
|
||||||
content = indexFile.read()
|
content = indexFile.read()
|
||||||
|
|
Loading…
Reference in New Issue