Project

General

Profile

Bug #22333 ยป 13925.diff

Administrator Admin, 2010-03-26 23:34

View differences:

t3lib/cache/backend/class.t3lib_cache_backend_filebackend.php (working copy)
public function setCacheDirectory($cacheDirectory) {
$documentRoot = PATH_site;
// resetting if an absolute path is given
if ($cacheDirectory{0} == '/') {
$documentRoot = '/';
if (TYPO3_OS === 'WIN') {
// convert backslashes on window machines
$cacheDirectory = str_replace('\\', '/', $cacheDirectory);
// look for absolute path
if (strpos($cacheDirectory, ':/') !== FALSE) { // Windows path
$documentRoot = '';
}
} else {
// resetting if an absolute path is given
if ($cacheDirectory{0} == '/') { // Linux path
$documentRoot = '/';
}
}
if ($cacheDirectory{strlen($cacheDirectory) - 1} !== '/') {
......
if (!is_dir($documentRoot . $cacheDirectory)) {
throw new t3lib_cache_Exception(
'The directory "' . $cacheDirectory . '" does not exist.',
'The directory "' . $documentRoot . $cacheDirectory . '" does not exist.',
1203965199
);
}
if (!is_writable($documentRoot . $cacheDirectory)) {
throw new t3lib_cache_Exception(
'The directory "' . $cacheDirectory . '" is not writable.',
'The directory "' . $documentRoot . $cacheDirectory . '" is not writable.',
1203965200
);
}
    (1-1/1)