Skip to content

Commit

Permalink
BUGFIX Supress mkdir() when attempting to create a temp folder, instead
Browse files Browse the repository at this point in the history
of the variable. This gives a nicer error in the installer.
  • Loading branch information
Sean Harvey committed Jun 14, 2012
1 parent 04e5ff0 commit 1059863
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/Core.php
Expand Up @@ -324,14 +324,14 @@ function getTempFolder($base = null) {
$ssTmp = "$sysTmp/$cachefolder";

if(!@file_exists($ssTmp)) {
@$worked = mkdir($ssTmp);
$worked = @mkdir($ssTmp);
}

if(!$worked) {
$ssTmp = BASE_PATH . "/silverstripe-cache";
$worked = true;
if(!@file_exists($ssTmp)) {
@$worked = mkdir($ssTmp);
$worked = @mkdir($ssTmp);
}
}

Expand Down
4 changes: 2 additions & 2 deletions dev/install/install.php5
Expand Up @@ -725,14 +725,14 @@ class InstallRequirements {
$ssTmp = "$sysTmp/silverstripe-cache";

if(!@file_exists($ssTmp)) {
@$worked = mkdir($ssTmp);
$worked = @mkdir($ssTmp);
}

if(!$worked) {
$ssTmp = dirname($_SERVER['SCRIPT_FILENAME']) . '/silverstripe-cache';
$worked = true;
if(!@file_exists($ssTmp)) {
@$worked = mkdir($ssTmp);
$worked = @mkdir($ssTmp);
}
}

Expand Down

0 comments on commit 1059863

Please sign in to comment.