Fix bad cache detection
This commit is contained in:
parent
698d85080b
commit
01cbfb3c5e
1 changed files with 7 additions and 5 deletions
|
@ -97,12 +97,14 @@ class Cache {
|
|||
* @return bool `true` if the count of files and directories has changed and the cache is updated; `false` otherwise.
|
||||
*/
|
||||
public function changeFile(): bool {
|
||||
if (isset($this->fileCache[$this->currentDir])) {
|
||||
if (!isset($this->fileCache[$this->currentDir])) {
|
||||
$this->fileCache[$this->currentDir] = -1;
|
||||
}
|
||||
|
||||
if ($this->counter[$this->currentDir] !== $this->fileCache[$this->currentDir]) {
|
||||
$this->fileCache = array_merge($this->fileCache, $this->counter);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue