aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFavoritesExporter.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPFavoritesExporter.m')
-rw-r--r--Source/SPFavoritesExporter.m7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/SPFavoritesExporter.m b/Source/SPFavoritesExporter.m
index d9342fa8..d37ce07d 100644
--- a/Source/SPFavoritesExporter.m
+++ b/Source/SPFavoritesExporter.m
@@ -74,10 +74,13 @@
// Get a dictionary representation of all favorites
for (SPTreeNode *node in [self exportFavorites])
{
- [favorites addObject:[node dictionaryRepresentation]];
+ // The selection could contain a group as well as items in that group.
+ // So we skip those items, as their group will already export them.
+ if(![node isDescendantOfNodes:[self exportFavorites]])
+ [favorites addObject:[node dictionaryRepresentation]];
}
- NSDictionary *dictionary = [NSDictionary dictionaryWithObject:favorites forKey:SPFavoritesDataRootKey];
+ NSDictionary *dictionary = @{SPFavoritesDataRootKey : favorites};
[favorites release];