BUGFIX Supress mkdir() when attempting to create a temp folder, instead

of the variable. This gives a nicer error in the installer.
This commit is contained in:
Sean Harvey 2012-06-15 11:48:42 +12:00
parent 04e5ff09ca
commit 105986392b
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}
}

View File

@ -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);
}
}