Bugfixes and improvements

* Implemented the --image option
* Implemented the --write-state option to go with --check
* Fixed bug in Lockfile class
This commit is contained in:
2022-03-11 01:55:35 +01:00
parent 66abd9d3c5
commit e77e61d0b0
5 changed files with 85 additions and 13 deletions

View File

@ -17,7 +17,7 @@ class Lockfile
public function lock()
{
if (file_exists($this->filename)) {
if (time() - filemtime($this->filename) < $this-$maxLock) {
if (time() - filemtime($this->filename) < $this->maxLock) {
throw new \RuntimeException("Lockfile {$this->filename} already exists");
}
}