Permalink
Browse files

Merge pull request #743 from BlaineSch/bug/tmpDirIncorrectFolderStruc…

…ture

Create the correct file structure in the systems tmp directory
  • Loading branch information...
2 parents 613361f + dff4513 commit 6cc895b1e5c8433a074892a628d7254cb8e56e2b @nateabele nateabele committed Dec 18, 2012
Showing with 13 additions and 1 deletion.
  1. +7 −1 console/lithium.php
  2. +6 −0 tests/cases/console/RequestTest.php
View
@@ -34,11 +34,17 @@
throw new ErrorException($message);
}
+ $resources = sys_get_temp_dir();
+ $templates = $resources . '/tmp/cache/templates/';
+ if (!is_dir($templates)) {
+ mkdir($resources . '/tmp/cache/templates/', 0777, true);
+ }
+
lithium\core\Libraries::add('lithium');
lithium\core\Libraries::add(basename($working), array(
'default' => true,
'path' => $working,
- 'resources' => sys_get_temp_dir()
+ 'resources' => $resources
));
};
@@ -175,6 +175,12 @@ public function testShiftTwo() {
$result = $request->params;
$this->assertEqual($expected, $result);
}
+
+ public function testTemporaryFileStructureExists() {
+ $resources = Libraries::get(true, 'resources');
+ $template = $resources . '/tmp/cache/templates/';
+ $this->assert(is_dir($template));
+ }
}
?>

0 comments on commit 6cc895b

Please sign in to comment.