Only write if file does not exist

main2
Bob Mottram 2019-11-02 11:32:43 +00:00
parent d6a17f1209
commit b877af4ae8
1 changed files with 6 additions and 5 deletions

View File

@ -146,6 +146,7 @@ def addShare(baseDir: str, \
# indicate that a new share is available
newShareFile=baseDir+'/accounts/.newShare'
if not os.path.isfile(newShareFile):
try:
with open(newShareFile, 'w') as fp:
fp.write('\n')