Skip to content

Commit

Permalink
Fix directory separator issue creating cachecompiled and cachetmp fol…
Browse files Browse the repository at this point in the history
…ders
  • Loading branch information
flaviocopes committed Apr 27, 2016
1 parent c91ce79 commit 9129ce2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion system/src/Grav/Common/File/CompiledFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public function content($var = null)
// If nothing has been loaded, attempt to get pre-compiled version of the file first.
if ($var === null && $this->raw === null && $this->content === null) {
$key = md5($this->filename);
$file = PhpFile::instance(CACHE_DIR . "compiled/files/{$key}{$this->extension}.php");
$file = PhpFile::instance(CACHE_DIR . DS . "compiled/files/{$key}{$this->extension}.php");

$modified = $this->modified();

if (!$modified) {
Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/GPM/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static function install($package, $destination, $options = [])
$zip = new \ZipArchive();
$archive = $zip->open($package);
$cache_dir = Grav::instance()['locator']->findResource('cache://', true);
$tmp = $cache_dir . 'tmp/Grav-' . uniqid();
$tmp = $cache_dir . DS . 'tmp/Grav-' . uniqid();

if ($archive !== true) {
self::$error = self::ZIP_OPEN_ERROR;
Expand Down

0 comments on commit 9129ce2

Please sign in to comment.