Skip to content
Snippets Groups Projects
Commit f969ef1e authored by Alexander Opitz's avatar Alexander Opitz Committed by Wouter Wolters
Browse files

[BUGFIX] Fix start of identifier from /./ to /

The PHP function dirname returns an dot if the given filename
do not have a path included. On this path we pre- and append a
slash as directory seperator and this leads to /./ for the identifier.

By handling the dot and replace it with a single slash we get the
clean identifier we need. The result of dirname shouldn't be
empty, but we also will replace this with a single slash.

The problem didn't occured yet, as we didn't saved the resulting
file object in the index, which was changed by #46595

Reproducing:
* select the default LocalStorage root directory (fileadmin/)
* Upload a file
* Look in the sys_file table you have 2 entries without this patch.

Resolves: #47705
Releases: 6.2, 6.1, 6.0
Change-Id: I1c927fe768e3b622fde8d9f6665f78bf277b46f7
Reviewed-on: https://review.typo3.org/20348
Reviewed-by: Peter Niederlag
Tested-by: Peter Niederlag
Reviewed-by: Dmitry Dulepov
Tested-by: Dmitry Dulepov
Reviewed-by: Stefan Neufeind
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
parent 632e0a15
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment