Skip to content
Snippets Groups Projects
Commit 4570e954 authored by Tom N Harris's avatar Tom N Harris
Browse files

Fix border condition on recent change update

darcs-hash:20071015225711-6942e-4d540e23e3c2ab62e378b0b9bc3cb80041c79350.gz
parent 85767031
No related branches found
No related tags found
No related merge requests found
......@@ -67,10 +67,10 @@ function runTrimRecentChanges() {
!@file_exists($conf['changelog'].'_tmp')) {
io_lock($conf['changelog']);
$lines = file($conf['changelog']);
if (count($lines)<$conf['recent']) {
if (count($lines)<=$conf['recent']) {
// nothing to trim
io_unlock($conf['changelog']);
return true;
return false;
}
io_saveFile($conf['changelog'].'_tmp', ''); // presave tmp as 2nd lock
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment