Browse Source

fix FileEngine, divergent behavior when debug is off or on

Thomas von Hassel 11 years ago
parent
commit
c4b8453275
1 changed files with 4 additions and 5 deletions
  1. 4 5
      src/Cache/Engine/FileEngine.php

+ 4 - 5
src/Cache/Engine/FileEngine.php

@@ -401,12 +401,11 @@ class FileEngine extends CacheEngine {
  */
 	protected function _active() {
 		$dir = new \SplFileInfo($this->_config['path']);
-		if (Configure::read('debug')) {
-			$path = $dir->getPathname();
-			if (!is_dir($path)) {
-				mkdir($path, 0775, true);
-			}
+		$path = $dir->getPathname();
+		if (!is_dir($path)) {
+			mkdir($path, 0775, true);
 		}
+
 		if ($this->_init && !($dir->isDir() && $dir->isWritable())) {
 			$this->_init = false;
 			trigger_error(sprintf(