From 122bd2503cd651f424adfbd442d0d9e1658f5ac0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 5 Nov 2019 12:12:30 +0000 Subject: [PATCH] Remove deactivated files --- person.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/person.py b/person.py index d71e0bf41..4c6e4de27 100644 --- a/person.py +++ b/person.py @@ -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: