From 11d9765a69e95fdd715b7c615e458b35f03af9d6 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 16 Sep 2015 11:38:25 -0400 Subject: [PATCH] Add verbose output to "sogo-tool remove" command --- Tools/SOGoToolRemove.m | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Tools/SOGoToolRemove.m b/Tools/SOGoToolRemove.m index 77af43cf2..34ef10bad 100644 --- a/Tools/SOGoToolRemove.m +++ b/Tools/SOGoToolRemove.m @@ -116,13 +116,19 @@ static NSURL *tableURL = nil; - (void) _removeUserFolders: (NSString *) userId { NSArray *folderPaths; + NSString *path; int count, max; folderPaths = [self _userFolderPaths: userId]; max = [folderPaths count]; if (max > 0) for (count = 0; count < max; count++) - [fm deleteFolderAtPath: [folderPaths objectAtIndex: count]]; + { + path = [folderPaths objectAtIndex: count]; + [fm deleteFolderAtPath: path]; + if (verbose) + NSLog (@"Deleting %@", path); + } else NSLog (@"No folder returned for user '%@'", userId); } @@ -144,6 +150,8 @@ static NSURL *tableURL = nil; userId]; if ([fc evaluateExpressionX: sql]) NSLog (@"Unable to delete the preference record for '%@'", userId); + else if (verbose) + NSLog (@"Removed preference record for '%@'", userId); [cm releaseChannel: fc]; } }