From 0b74efd7f2bce9c6a1d1b71ffe1045c7e03f1db5 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 30 Nov 2009 15:42:16 +0000 Subject: [PATCH] Monotone-Parent: 3c3f676520d5f154730079c576d8ffde515851cd Monotone-Revision: 83e7d2455de99bbdf6ca18f2e16478d506a07412 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-11-30T15:42:16 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++-- SoObjects/SOGo/SOGoDefaultsSource.m | 17 +++++------------ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index f182314d6..a256364c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,8 +2,9 @@ * SoObjects/SOGo/SOGoDefaultsSource.m (-migrateOldDefaultsWithDictionary:): when migrating between two - existing keys, the migration is not interrupted if both values are - the same. + existing keys, the new value is automatically overwritten with the + old one, since it causes a problem with the values inherited from + SOGoDefaults.plist. 2009-11-29 Wolfgang Sourdeau diff --git a/SoObjects/SOGo/SOGoDefaultsSource.m b/SoObjects/SOGo/SOGoDefaultsSource.m index c12086769..04b2251ce 100644 --- a/SoObjects/SOGo/SOGoDefaultsSource.m +++ b/SoObjects/SOGo/SOGoDefaultsSource.m @@ -213,18 +213,11 @@ NSString *SOGoDefaultsSourceUnmutableSource = @"SOGoDefaultsSourceUnmutableSourc { newName = [migratedKeys objectForKey: oldName]; existingValue = [source objectForKey: newName]; - if (existingValue && ![existingValue isEqual: currentValue]) - [self errorWithFormat: @"both old and new defaults key" - @" ('%@' and '%@') exist with a different value." - @" Migration skipped.", oldName, newName]; - else - { - requireSync = YES; - [source setObject: currentValue forKey: newName]; - [source removeObjectForKey: oldName]; - [self warnWithFormat: @"defaults key '%@' was renamed to '%@'", - oldName, newName]; - } + requireSync = YES; + [source setObject: currentValue forKey: newName]; + [source removeObjectForKey: oldName]; + [self warnWithFormat: @"defaults key '%@' was renamed to '%@'", + oldName, newName]; } }