From 3a00ca0457d2eea27721f489b8eb64eb297b711e Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Tue, 4 Oct 2022 17:55:21 -0600 Subject: [PATCH] temp workaround for windows issue - Fixes #2299 --- system/src/Grav/Common/File/CompiledFile.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/system/src/Grav/Common/File/CompiledFile.php b/system/src/Grav/Common/File/CompiledFile.php index eaf46f7024..f7fb767565 100644 --- a/system/src/Grav/Common/File/CompiledFile.php +++ b/system/src/Grav/Common/File/CompiledFile.php @@ -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 = [