mirror of https://gitlab.com/bashrc2/epicyon
Remove paths from index
parent
084c5c0cc9
commit
abd62d4d6e
6
inbox.py
6
inbox.py
|
@ -1576,8 +1576,14 @@ def inboxUpdateIndex(boxname: str,baseDir: str,handle: str,destinationFilename:
|
||||||
indexFilename=baseDir+'/accounts/'+handle+'/'+boxname+'.index'
|
indexFilename=baseDir+'/accounts/'+handle+'/'+boxname+'.index'
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Updating index '+indexFilename)
|
print('DEBUG: Updating index '+indexFilename)
|
||||||
|
|
||||||
if '/'+boxname+'/' in destinationFilename:
|
if '/'+boxname+'/' in destinationFilename:
|
||||||
destinationFilename=destinationFilename.split('/'+boxname+'/')[1]
|
destinationFilename=destinationFilename.split('/'+boxname+'/')[1]
|
||||||
|
|
||||||
|
# remove the path
|
||||||
|
if '/' in destinationFilename:
|
||||||
|
destinationFilename=destinationFilename.split('/')[-1]
|
||||||
|
|
||||||
if os.path.isfile(indexFilename):
|
if os.path.isfile(indexFilename):
|
||||||
try:
|
try:
|
||||||
with open(indexFilename, 'r+') as indexFile:
|
with open(indexFilename, 'r+') as indexFile:
|
||||||
|
|
Loading…
Reference in New Issue