diff options
Diffstat (limited to 'Source/SPPreferencesUpgrade.m')
-rw-r--r-- | Source/SPPreferencesUpgrade.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/SPPreferencesUpgrade.m b/Source/SPPreferencesUpgrade.m index 1a7e9349..fad33e7c 100644 --- a/Source/SPPreferencesUpgrade.m +++ b/Source/SPPreferencesUpgrade.m @@ -325,6 +325,18 @@ void SPApplyRevisionChanges(void) [importantUpdateNotes addObject:NSLocalizedString(@"We've changed Sequel Pro's digital signature for GateKeeper compatibility; you'll have to allow access to your passwords again.", @"Short important release note for why password prompts may occur")]; } + // For versions prior to 3970 (~1.0), move the old plist to the trash + if (recordedVersionNumber < 3970) { + NSString *oldPrefPath = @"~/Library/Preferences/com.google.code.sequel-pro.plist"; + oldPrefPath = [oldPrefPath stringByExpandingTildeInPath]; + if ([[NSFileManager defaultManager] fileExistsAtPath:oldPrefPath]) { + FSRef plistFSRef; + if (FSPathMakeRef((const UInt8 *)[oldPrefPath fileSystemRepresentation], &plistFSRef, NULL) == noErr) { + FSMoveObjectToTrashSync(&plistFSRef, NULL, 0); + } + } + } + // Display any important release notes, if any. Call this after a slight delay to prevent double help // menus - see http://www.cocoabuilder.com/archive/cocoa/6200-two-help-menus-why.html . [SPPreferencesUpgrade performSelector:@selector(showPostMigrationReleaseNotes:) withObject:importantUpdateNotes afterDelay:0.1]; |