]> git.saurik.com Git - cydia.git/commitdiff
Add a lock around configuration saving to the metafile.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 15 Mar 2011 17:44:45 +0000 (10:44 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 15 Mar 2011 17:44:45 +0000 (10:44 -0700)
MobileCydia.mm

index 2646549c5e9b24402fcdb7a846f21db5a9f1fcb8..6555d3c46be32bff40d8ae3703266091f47e5a95 100644 (file)
@@ -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);