diff options
author | rowanbeentje <rowan@beent.je> | 2013-01-16 00:36:51 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2013-01-16 00:36:51 +0000 |
commit | 7aa53f9496cab4625806ca38fad65d0ef6c93452 (patch) | |
tree | 9f5e56623cb229495e6b359d254bd7c2747ecf2c /Source | |
parent | ad016807a908e6bec3174f9e5eae9524e6243d57 (diff) | |
download | sequelpro-7aa53f9496cab4625806ca38fad65d0ef6c93452.tar.gz sequelpro-7aa53f9496cab4625806ca38fad65d0ef6c93452.tar.bz2 sequelpro-7aa53f9496cab4625806ca38fad65d0ef6c93452.zip |
- Move the old com.google.code.sequel-pro.plist preference list to the trash now that migration to com.sequelpro.SequelPro.plist has completed.
Diffstat (limited to 'Source')
-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]; |