[BUGFIX] Copy and move folders between storages is broken 94/19194/4
authorNicole Cordes <typo3@cordes.co>
Fri, 22 Mar 2013 17:23:39 +0000 (18:23 +0100)
committerAndreas Wolf <andreas.wolf@typo3.org>
Sat, 23 Mar 2013 11:21:54 +0000 (12:21 +0100)
commita9538cdbbf46c97710155d821f8c084c867a149c
tree4ebaffa66b55b6b50e4cbcf434bc17f544005a92
parent26e634f192ce33c702e7e83fa774b5d933f28971
[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/19194
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
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