Skip to content
This repository

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

Merged
merged 1 commit into from over 1 year ago

2 participants

Blaine Schmeisser Nate Abele
Blaine Schmeisser
Collaborator

To reproduce the error:

  • Pull a fresh install of the framework
  • Upgrade lithium
  • Install a library
  • Run the library tests through the command line

You can see the exact steps on this traivs build.

Nate Abele nateabele merged commit 6cc895b into from
Nate Abele nateabele closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Dec 14, 2012
Blaine Schmeisser Create the correct file structure in the systems tmp directory dff4513
This page is out of date. Refresh to see the latest.
8  console/lithium.php
@@ -34,11 +34,17 @@
34 34
 		throw new ErrorException($message);
35 35
 	}
36 36
 
  37
+	$resources = sys_get_temp_dir();
  38
+	$templates = $resources . '/tmp/cache/templates/';
  39
+	if (!is_dir($templates)) {
  40
+		mkdir($resources . '/tmp/cache/templates/', 0777, true);
  41
+	}
  42
+
37 43
 	lithium\core\Libraries::add('lithium');
38 44
 	lithium\core\Libraries::add(basename($working), array(
39 45
 		'default' => true,
40 46
 		'path' => $working,
41  
-		'resources' => sys_get_temp_dir()
  47
+		'resources' => $resources
42 48
 	));
43 49
 };
44 50
 
6  tests/cases/console/RequestTest.php
@@ -175,6 +175,12 @@ public function testShiftTwo() {
175 175
 		$result = $request->params;
176 176
 		$this->assertEqual($expected, $result);
177 177
 	}
  178
+
  179
+	public function testTemporaryFileStructureExists() {
  180
+		$resources = Libraries::get(true, 'resources');
  181
+		$template = $resources . '/tmp/cache/templates/';
  182
+		$this->assert(is_dir($template));
  183
+	}
178 184
 }
179 185
 
180 186
 ?>
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.