diff --git a/shares.py b/shares.py index 5b5670824..5edb7700e 100644 --- a/shares.py +++ b/shares.py @@ -145,13 +145,17 @@ def addShare(baseDir: str, \ saveJson(sharesJson,sharesFilename) # 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') - except: - pass + for subdir, dirs, files in os.walk(baseDir+'/accounts'): + for handle in dirs: + if '@' in handle: + accountDir=baseDir+'/accounts/'+handle + newShareFile=accountDir+'/.newShare' + if not os.path.isfile(newShareFile): + try: + with open(newShareFile, 'w') as fp: + fp.write('\n') + except: + pass def expireShares(baseDir: str) -> None: """Removes expired items from shares diff --git a/webinterface.py b/webinterface.py index c1c544b3c..adfe3bfdd 100644 --- a/webinterface.py +++ b/webinterface.py @@ -2195,7 +2195,7 @@ def htmlTimeline(translate: {},pageNumber: int, \ # should the Shares button be highlighted? newShare=False - newShareFile=baseDir+'/accounts/.newShare' + newShareFile=accountDir+'/.newShare' if os.path.isfile(newShareFile): newShare=True if boxName=='tlshares':