Create the correct file structure in the systems tmp directory #743

Merged
merged 1 commit into from Dec 18, 2012
Jump to file or symbol
Failed to load files and symbols.
+13 −1
Split
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));
+ }
}
?>