optimized cli workflow

This commit is contained in:
2022-12-09 23:43:28 +01:00
parent 72765e280d
commit e4217afe64
4 changed files with 35 additions and 8 deletions

View File

@@ -26,7 +26,11 @@ class Cleanup(AbstractSplittedSecret):
self.deleteAllFilesInFolder(folder_path)
def cleanupForUser(self,user):
self.executeCommand('find "' + self.getFolderPath("encrypted") + '" -not -name "*' + str(user) +'*" -type f -print | xargs rm -v')
try:
self.executeCommand('find "' + self.getFolderPath("encrypted") + '" -not -name "*' + str(user) +'*" -type f -print | xargs rm -v')
except:
pass
self.deleteAllFiles("decrypted")
def deleteAll(self):
self.deleteAllFiles("encrypted")