Commit 72e343b3 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: bump plist version to avoid exceptions when upgrading from 2.0.x or 2.1-git

No explicit settings performed by the user are affected, so most won't notice except for reset window positions
parent 3efeac83
...@@ -1871,7 +1871,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1871,7 +1871,7 @@ static VLCMain *_o_sharedMainInstance = nil;
- (void)removeOldPreferences - (void)removeOldPreferences
{ {
static NSString * kVLCPreferencesVersion = @"VLCPreferencesVersion"; static NSString * kVLCPreferencesVersion = @"VLCPreferencesVersion";
static const int kCurrentPreferencesVersion = 2; static const int kCurrentPreferencesVersion = 3;
NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults]; NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults];
int version = [defaults integerForKey:kVLCPreferencesVersion]; int version = [defaults integerForKey:kVLCPreferencesVersion];
if (version >= kCurrentPreferencesVersion) if (version >= kCurrentPreferencesVersion)
...@@ -1885,6 +1885,13 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1885,6 +1885,13 @@ static VLCMain *_o_sharedMainInstance = nil;
return; return;
else else
config_SaveConfigFile(VLCIntf); // we need to do manually, since we won't quit libvlc cleanly config_SaveConfigFile(VLCIntf); // we need to do manually, since we won't quit libvlc cleanly
} else if (version == 2) {
/* version 2 (used by VLC 2.0.x and early versions of 2.1) can lead to exceptions within 2.1 or later
* so we reset the OS X specific prefs here - in practice, no user will notice */
[NSUserDefaults resetStandardUserDefaults];
[defaults setInteger:kCurrentPreferencesVersion forKey:kVLCPreferencesVersion];
[defaults synchronize];
} else { } else {
NSArray *libraries = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSArray *libraries = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
NSUserDomainMask, YES); NSUserDomainMask, YES);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment