diff options
-rw-r--r-- | Source/SPFavoritesImporter.m | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/SPFavoritesImporter.m b/Source/SPFavoritesImporter.m index bb027104..b8888537 100644 --- a/Source/SPFavoritesImporter.m +++ b/Source/SPFavoritesImporter.m @@ -33,6 +33,8 @@ #import "SPFavoritesImporter.h" #import "SPThreadAdditions.h" +static NSString *SPOldPreferenceFileFavoritesKey = @"favorites"; + @interface SPFavoritesImporter () - (void)_importFavoritesInBackground; @@ -81,8 +83,14 @@ [self _informDelegateOfImportDataAvailable:favorites]; } else { - [self _informDelegateOfErrorCode:NSFileReadUnknownError - description:NSLocalizedString(@"Error reading import file.", @"error reading import file")]; + + // Check to see whether we're importing favorites from an old preferences file + if ([importData valueForKey:SPOldPreferenceFileFavoritesKey]) { + [self _informDelegateOfImportDataAvailable:[importData valueForKey:SPOldPreferenceFileFavoritesKey]]; + } else { + [self _informDelegateOfErrorCode:NSFileReadUnknownError + description:NSLocalizedString(@"Error reading import file.", @"error reading import file")]; + } } } else { |