Skip to content

Commit

Permalink
Update Compiler.php
Browse files Browse the repository at this point in the history
Fixes #3
  • Loading branch information
Gappa authored Jul 28, 2021
1 parent 5b33b0d commit 4b18c88
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,9 @@ protected function generateFiles(array $files, array $watchFiles = []): File
$lastModified = $this->checkLastModified ? $this->getLastModified($watchFiles) : 0;

if (!file_exists($path) || $lastModified > filemtime($path) || $this->debugging === true) {
$outPath = in_array('nette.safe', stream_get_wrappers(), true) ? 'nette.safe://' . $path : $path;
FileSystem::write($outPath, $this->getContent($files));
// disabled: https://github.com/nette/safe-stream/pull/5
// $outPath = in_array('nette.safe', stream_get_wrappers(), true) ? 'nette.safe://' . $path : $path;
FileSystem::write($path, $this->getContent($files));
}

return new File($name, (int) filemtime($path), $files);
Expand Down

0 comments on commit 4b18c88

Please sign in to comment.