[BUGFIX] PublicURL calculation for storage 0 is wrong 95/28395/7
authorSteffen Ritter <info@rs-websystems.de>
Fri, 14 Mar 2014 18:04:13 +0000 (19:04 +0100)
committerXavier Perseguers <xavier@typo3.org>
Sat, 15 Mar 2014 10:17:56 +0000 (11:17 +0100)
commit2806f70e24f59173f06a98818892f578d4cf186f
treee68d539faca551c1d8df44c939cc99bd29db4fe5
parentddfa1866f574a948509db9383807a063a4cf8534
[BUGFIX] PublicURL calculation for storage 0 is wrong

Since the refactoring of the publicURL Feature and the possibility to
link to files via jump-scripts the generation of publicUrls for files
in storage zero is broken due to the fact that every relative base-path
for this URL is appended with a slash.

If the base-path has been empty (like for storage 0), appending a slash
makes it absolute.

This patch changes the behaviour to only append a slash on non-empty
paths.

Releases: 6.2
Resolves: #56927
Change-Id: I14e8bae0b64ed8dc537a5edbf57d9dce6ddf0932
Reviewed-on: https://review.typo3.org/28395
Reviewed-by: Alexander Stehlik
Tested-by: Alexander Stehlik
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php