[BUGFIX] Folders created from BE fail to set permissions 17/32917/4
authorBenjamin Mack <benni@typo3.org>
Sat, 10 Jan 2015 18:36:42 +0000 (19:36 +0100)
committerBenjamin Mack <benni@typo3.org>
Sat, 10 Jan 2015 19:19:03 +0000 (20:19 +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>
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php

index 961f61c..0f62b95 100644 (file)
@@ -228,13 +228,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;
        }