Merge pull request #533 from halkyon/supress_mkdir_temp

BUGFIX Supress mkdir() when attempting to create a temp folder, instead
This commit is contained in:
Sam Minnée 2012-06-14 16:53:54 -07:00
commit 5062bb8ff5
2 changed files with 4 additions and 4 deletions

View File

@ -327,14 +327,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);
}
}