[BUGFIX] FAL wrong \RecursiveIteratorIterator usage 07/22607/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 26 Jul 2013 18:54:23 +0000 (20:54 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 26 Jul 2013 20:40:58 +0000 (22:40 +0200)
commit542243d74be5cefa515a8d4a515457b0b0380886
tree2c87b8748857d5a9e58945364dfcfbcedf26addf
parentf8db5aad06e4c6d62d9a251609cd46303fe68c61
[BUGFIX] FAL wrong \RecursiveIteratorIterator usage

If using \RecursiveIteratorIterator on \RecursiveDirectoryIterator,
flag SELF_FIRST must be used, otherwise only leaves (files) and not
also directories are returned. This behavior is a bit dependent on
the PHP version used, younger versions (> 5.3.3 seem to do it
correctly).

Furthermore, in copyFolderWithinStorage() $itemSubPath contains
the "relative" path part and not only the node name, checking
equality to "." or ".." fails then if handling sub directories.
So, directories may be created multiple times, resulting in mkdir()
warnings. This is fixed by getting the node name itself and using
that for comparison.

Resolves: #50476
Releases: 6.2, 6.1, 6.0

Change-Id: Ifac4b28f4e02ec8a9bf5891739cf66c1e1074af9
Reviewed-on: https://review.typo3.org/22602
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
(cherry picked from commit ef8204d64f44c4643482c7e6a01313a1b702ca43)
Reviewed-on: https://review.typo3.org/22607
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php