Fix folders paths of "sogo-tool restore -l"

pull/53/head
Francis Lachapelle 2014-08-26 09:00:13 -04:00
parent e4a84d4920
commit b2b77c65d3
2 changed files with 5 additions and 4 deletions

1
NEWS
View File

@ -12,6 +12,7 @@ Bug fixes
- fixed encoding of new calendars and new subscriptions (JavaScript only) - fixed encoding of new calendars and new subscriptions (JavaScript only)
- fixed display of users with no possible subscription - fixed display of users with no possible subscription
- fixed usage of SOGoSubscriptionFolderFormat domain default when the folder's name hasn't been changed - fixed usage of SOGoSubscriptionFolderFormat domain default when the folder's name hasn't been changed
- fixed "sogo-tool restore -l" that was returning incorrect folder IDs
2.2.7 (2014-07-30) 2.2.7 (2014-07-30)
------------------ ------------------

View File

@ -558,14 +558,14 @@ typedef enum SOGoToolRestoreMode {
if (tables) if (tables)
{ {
NSLog (@"Restorable folders:"); NSLog (@"Restorable folders:");
folderPrefixLen = 1 + [userID length]; folderPrefixLen = 8 + [userID length]; // tables keys start with /Users/<userID>
tableKeys = [[tables allKeys] objectEnumerator]; tableKeys = [[[tables allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)] objectEnumerator];
while ((key = [tableKeys nextObject])) while ((key = [tableKeys nextObject]))
{ {
currentFolder = [tables objectForKey: key]; currentFolder = [tables objectForKey: key];
folderKey = [key substringFromIndex: folderPrefixLen]; folderKey = [key substringFromIndex: folderPrefixLen];
NSLog (@" '%@': %@", NSLog (@" %@ (%@)",
[currentFolder objectForKey: @"displayname"], folderKey); folderKey, [currentFolder objectForKey: @"displayname"]);
} }
} }
else else