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