Remove deactivated files

main2
Bob Mottram 2019-11-05 12:12:30 +00:00
parent 78324f2f07
commit 122bd2503c
1 changed files with 4 additions and 0 deletions

View File

@ -697,6 +697,10 @@ def removeAccount(baseDir: str,nickname: str,domain: str,port: int) -> bool:
os.remove(baseDir+'/keys/public/'+handle+'.pem')
if os.path.isdir(baseDir+'/sharefiles/'+nickname):
shutil.rmtree(baseDir+'/sharefiles/'+nickname)
if os.path.isfile(baseDir+'/wfdeactivated/'+handle+'.json':
os.remove(baseDir+'/wfdeactivated/'+handle+'.json')
if os.path.isdir(baseDir+'/sharefilesdeactivated/'+nickname):
shutil.rmtree(baseDir+'/sharefilesdeactivated/'+nickname)
return True
def deactivateAccount(baseDir: str,nickname: str,domain: str) -> bool: