Issue Bug Closed

#24460[Cache] Filebackend fails on windows

Steffen Kamper 01/03/11, 19:33 updated 10/02/18, 12:21

Description

The filebackend fails on windows it setCacheDirectory is used with relative path.

This is due a missing check, which is done for other OS.

Check for non-windows:

if ($cacheDirectory[0] == '/') {
        // Absolute path to cache directory.
    $documentRoot = '/';
}

Error for windows:

if (TYPO3_OS === 'WIN') {
    $documentRoot = '';
}

should be:

if (TYPO3_OS === 'WIN') {
    if (substr($cacheDirectory, 0,  strlen($documentRoot)) === $documentRoot) {
        $documentRoot = '';
    }
}

(issue imported from #M16900)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.