Review main Abandoned

27728[BUGFIX] Prevent double slashes in directory paths in LocalDriver

Thomas Christiansen CR 0 V 0 Easy +5 −3 updated 01/10/15, 23:38

Commit message

In the Method createFolder() of LocalDriver the GeneralUtility::mkdir()
(or mkdir_deep() for for recursive) is always called with a path like
"/path/to/htdocs//typo3temp/_processed_".
Having these double slashes results in GeneralUtility::fixPermissions()
not being able to set permissions properly.

This is because the $parentFolderIdentifier always starts with a slash
and $this->getAbsoluteBasePath ends with one.
Calling $this->getAbsolutePath() resolves this issue because it trims
the leading slash first.

Additionally, $this->getAbsolutePath() crops trailing
slashes as well if a folder is given. mkdir_deep() fails then, so the
patch checks if a folder is given and returns a path with trailing
slash in that case.

Review

  • Code review CR 0

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 1