From 2ff0a309803449ec9ff373f36bbae7c6d386439d Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Tue, 11 Sep 2007 23:47:50 +0000 Subject: [PATCH] If there's a silverstripe-cache directory in the silverstripe folder, always use that instead of /tmp git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.1.0@41576 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/Core.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/Core.php b/core/Core.php index 0042dd48c..64729fe2e 100755 --- a/core/Core.php +++ b/core/Core.php @@ -4,6 +4,11 @@ * This is loaded into the TEMP_FOLDER define on start up */ function getTempFolder() { + $ssTmp = dirname(dirname($_SERVER['SCRIPT_FILENAME'])) . "/silverstripe-cache"; + if(@file_exists($ssTmp)) { + return $ssTmp; + } + if(function_exists('sys_get_temp_dir')) { $sysTmp = sys_get_temp_dir(); } elseif(isset($_ENV['TMP'])) {