[BUGFIX] Folders created from BE fail to set permissions 18/32918/7
authorBenjamin Mack <benni@typo3.org>
Sat, 10 Jan 2015 18:36:42 +0000 (19:36 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Sat, 10 Jan 2015 19:28:04 +0000 (20:28 +0100)
The created path during folder creation contains double slashes.
Therefore the function used to fix/set the permissions according to the
folderCreateMask setting aborts processing because it identifies the path
as invalid.

This patch causes the concatenation of the path elements to take care of
double slashes.

Resolves: #52309
Releases: master, 6.2
Change-Id: Ib96d6ebc40f155758bbd92cb60b87420bda34597
Reviewed-on: http://review.typo3.org/32917
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
(cherry picked from commit 59671a2dfe152f01207a520c544967ba6b35f301)
Reviewed-on: http://review.typo3.org/32918

typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php

index 0803211..aa8e08d 100644 (file)
@@ -226,13 +226,13 @@ class LocalDriver extends AbstractHierarchicalFilesystemDriver {
                if ($recursive == FALSE) {
                        $newFolderName = $this->sanitizeFileName($newFolderName);
                        $newIdentifier = $parentFolderIdentifier . $newFolderName . '/';
-                       GeneralUtility::mkdir($this->getAbsoluteBasePath() . $newIdentifier);
+                       GeneralUtility::mkdir($this->getAbsolutePath($newIdentifier));
                } else {
                        $parts = GeneralUtility::trimExplode('/', $newFolderName);
                        $parts = array_map(array($this, 'sanitizeFileName'), $parts);
                        $newFolderName = implode('/', $parts);
                        $newIdentifier = $parentFolderIdentifier . $newFolderName . '/';
-                       GeneralUtility::mkdir_deep($this->getAbsoluteBasePath() . $parentFolderIdentifier, $newFolderName);
+                       GeneralUtility::mkdir_deep($this->getAbsolutePath($parentFolderIdentifier) . '/', $newFolderName);
                }
                return $newIdentifier;
        }