summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MobileCydia.mm9
1 files changed, 3 insertions, 6 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 3365c9b..231a57a 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -3988,8 +3988,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"));
@@ -4011,8 +4010,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"));
@@ -4145,8 +4143,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;