diff options
author | Sam Bingner <sam@bingner.com> | 2020-04-01 14:04:45 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2020-04-01 14:04:45 -1000 |
commit | e287ac6ceb199e27206135c77a51e88d5b9f9417 (patch) | |
tree | 3393cd79de8348fdaff49354a38dd01b40d7b953 | |
parent | a4cb13fd832b72a99d8d68304fe08815ec9e4098 (diff) |
Fix locking bug that was making cydia get killedv1.1.32%b25
-rw-r--r-- | MobileCydia.mm | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 192029b..7d0b2ba 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -3977,8 +3977,7 @@ class CydiaLogCleaner : if (lock_ != NULL) return false; - FileFd Lock; - Lock.Fd(GetLock(_config->FindDir("Dir::Cache::Archives") + "lock")); + FileFd Lock = FileFd(GetLock(_config->FindDir("Dir::Cache::Archives") + "lock"), true); NSString *title(UCLocalize("CLEAN_ARCHIVES")); @@ -4000,8 +3999,7 @@ class CydiaLogCleaner : pkgRecords records(cache_); - lock_ = new FileFd(); - lock_->Fd(GetLock(_config->FindDir("Dir::Cache::Archives") + "lock")); + lock_ = new FileFd(GetLock(_config->FindDir("Dir::Cache::Archives") + "lock"), true); NSString *title(UCLocalize("PREPARE_ARCHIVES")); @@ -4134,8 +4132,7 @@ class CydiaLogCleaner : if ([self popErrorWithTitle:title forReadList:list]) return; - FileFd lock; - lock.Fd(GetLock(_config->FindDir("Dir::State::Lists") + "lock")); + FileFd lock = FileFd(GetLock(_config->FindDir("Dir::State::Lists") + "lock"), true); if ([self popErrorWithTitle:title]) return; |