X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/d0c3e88d16ec5c8111369aa490d1f812d4dd4a0c..cf9903af62a73fbbf56790ea06caab1eb36089c0:/MobileCydia.mm?ds=inline diff --git a/MobileCydia.mm b/MobileCydia.mm index 069a04a8..5a091682 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8062,21 +8062,24 @@ static _finline void _setHomePage(Cydia *self) { } - (void) _saveConfig { + _trace(); + MetaFile_.Sync(); + _trace(); + if (Changed_) { - _trace(); NSString *error(nil); + if (NSData *data = [NSPropertyListSerialization dataFromPropertyList:Metadata_ format:NSPropertyListBinaryFormat_v1_0 errorDescription:&error]) { _trace(); NSError *error(nil); if (![data writeToFile:@"/var/lib/cydia/metadata.plist" options:NSAtomicWrite error:&error]) NSLog(@"failure to save metadata data: %@", error); _trace(); + + Changed_ = false; } else { NSLog(@"failure to serialize metadata: %@", error); - return; } - - Changed_ = false; } }