mirror of https://gitlab.com/bashrc2/epicyon
Only write to indexes once
parent
3554bf1c20
commit
cce7941b39
1
inbox.py
1
inbox.py
|
@ -1979,6 +1979,7 @@ def inboxUpdateIndex(boxname: str, baseDir: str, handle: str,
|
|||
try:
|
||||
with open(indexFilename, 'r+') as indexFile:
|
||||
content = indexFile.read()
|
||||
if destinationFilename + '\n' not in content:
|
||||
indexFile.seek(0, 0)
|
||||
indexFile.write(destinationFilename + '\n' + content)
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue