From 9129ce25d4fceee1a252b7f86cf1b76b6c6c8191 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Wed, 27 Apr 2016 10:18:34 +0200 Subject: [PATCH] Fix directory separator issue creating cachecompiled and cachetmp folders --- system/src/Grav/Common/File/CompiledFile.php | 3 ++- system/src/Grav/Common/GPM/Installer.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/system/src/Grav/Common/File/CompiledFile.php b/system/src/Grav/Common/File/CompiledFile.php index de8d172a8..bd74b9b3f 100644 --- a/system/src/Grav/Common/File/CompiledFile.php +++ b/system/src/Grav/Common/File/CompiledFile.php @@ -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) { diff --git a/system/src/Grav/Common/GPM/Installer.php b/system/src/Grav/Common/GPM/Installer.php index 630f7226b..58605d0a0 100644 --- a/system/src/Grav/Common/GPM/Installer.php +++ b/system/src/Grav/Common/GPM/Installer.php @@ -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;