[BUGFIX] Correct an always-true if statement in GeneralUtility::mkdir_deep 30/54330/2
authorJoshua Westerheide <dev@jdoubleu.de>
Sat, 7 Oct 2017 18:45:53 +0000 (20:45 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 9 Oct 2017 07:18:21 +0000 (09:18 +0200)
Resolves: #82697
Releases: master, 8.7, 7.6
Change-Id: I64bf51d5efd0394f4d3269965820281cbaf2de90
Reviewed-on: https://review.typo3.org/54330
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Utility/GeneralUtility.php

index 9dd6ca9..80ae9fb 100644 (file)
@@ -2292,7 +2292,7 @@ class GeneralUtility
         }
         // Ensure there is only one slash
         $fullPath = rtrim($directory, '/') . '/' . ltrim($deepDirectory, '/');
-        if ($fullPath !== '' && !is_dir($fullPath)) {
+        if ($fullPath !== '/' && !is_dir($fullPath)) {
             $firstCreatedPath = static::createDirectoryPath($fullPath);
             if ($firstCreatedPath !== '') {
                 static::fixPermissions($firstCreatedPath, true);