Skip to content

Commit

Permalink
temp workaround for windows issue - Fixes #2299
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Oct 4, 2022
1 parent 2f6e4b1 commit 3a00ca0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions system/src/Grav/Common/File/CompiledFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,12 @@ public function save($data = null)
$class = get_class($this);
$size = filesize($filename);

// Reload data from the filesystem. This ensures that we always cache the correct data (see issue #2282).
$this->raw = $this->content = null;
$data = (array)$this->decode($this->raw());
// windows doesn't play nicely with this as it can't read when locked
if (!Utils::isWindows()) {
// Reload data from the filesystem. This ensures that we always cache the correct data (see issue #2282).
$this->raw = $this->content = null;
$data = (array)$this->decode($this->raw());
}

// Decode data into compiled array.
$cache = [
Expand Down

0 comments on commit 3a00ca0

Please sign in to comment.