summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-15 10:44:45 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-15 10:44:45 -0700
commit9ac1ef9e7cedfafadf03b3c9defb7a9e581d9553 (patch)
treeea5c5e35f47c983dd062a6984d41698e7701239b
parente93fd095bb5265e57bc12b762e661ae29e6a8f1a (diff)
Add a lock around configuration saving to the metafile.
-rw-r--r--MobileCydia.mm8
1 files 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);