[BUGFIX] Copy and move folders between storages is broken 13/19213/2
authorNicole Cordes <typo3@cordes.co>
Fri, 22 Mar 2013 17:23:39 +0000 (18:23 +0100)
committerBenjamin Mack <benni@typo3.org>
Sat, 23 Mar 2013 21:26:01 +0000 (22:26 +0100)
commit6e7769ca481f34acfd4a7769ffdd13272043922a
treee3cadb16ee779a2fc95c49ef639538a57198c75a
parent58d76c887d75ccc175e0240ceaa666d5774f7880
[BUGFIX] Copy and move folders between storages is broken

If you try to copy a folder from one storage into another one it leads to
a copy in the same (source) storage. This happens because the action is
executed in the source storage and only works with the source folder
object. This is fixed by calling the move method on the target storage
instead.

Besides the copyFolderBetweenStorages function raises an exception which
might be moved into the driver class as the driver should be responsible
for the copy work. Therefore the AbstractDriver should support
(abstract) methods to copy a folder between storages and the local
driver should raises the exception.

Same applies for moving folders between storages.

Change-Id: Ib282e351f39abca21d57f5d621b4bd999f8419d9
Fixes: #46564
Releases: 6.1, 6.0
Reviewed-on: https://review.typo3.org/19213
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
typo3/sysext/core/Classes/Resource/Driver/AbstractDriver.php
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php
typo3/sysext/core/Classes/Resource/Folder.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php