From 7aa53f9496cab4625806ca38fad65d0ef6c93452 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 16 Jan 2013 00:36:51 +0000 Subject: - Move the old com.google.code.sequel-pro.plist preference list to the trash now that migration to com.sequelpro.SequelPro.plist has completed. --- Source/SPPreferencesUpgrade.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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]; -- cgit v1.2.3