From 9ac1ef9e7cedfafadf03b3c9defb7a9e581d9553 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 15 Mar 2011 10:44:45 -0700 Subject: Add a lock around configuration saving to the metafile. --- MobileCydia.mm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 2646549..6555d3c 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8964,9 +8964,11 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (void) _saveConfig { - _trace(); - MetaFile_.Sync(); - _trace(); + @synchronized (database_) { + _trace(); + MetaFile_.Sync(); + _trace(); + } if (Changed_) { NSString *error(nil); -- cgit v1.2.3