Review main Merged

19194[BUGFIX] Copy and move folders between storages is broken

Nicole Hummel CR +2 V +2 Normal +76 −18 updated 06/03/13, 20:49

Commit message

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.

Review

  • Code review CR +2
    • Andreas Wolf +2
  • Verified V +2
    • Andreas Wolf +2

Files 5

Review log 11

  1. Fabien Udriot commented on patch set 1 03/23/13, 11:21

    Looks good to me, but someone else must approve
  2. Mr. Jenkins commented on patch set 1 03/23/13, 11:21

  3. Andreas Wolf uploaded patch set 3 03/23/13, 11:21

  4. Alexander Opitz commented on patch set 2 03/23/13, 11:21

    Fails; Looks good to me, but someone else must approve With PHP 5.4.6-1ubuntu1.2 I get Segmentation Faults with this patch. The SegFault is coused by typo3/sysext/core/Classes/Resource/ResourceStorage.php:1368 for moving Files and typo3/sysext/core/Classes/Resource/ResourceStorage.php:1419 for copying files. It can be resolved by changing if ($sourceStorage == $this) { into if ($sourceStorage === $this) {
  5. Fabien Udriot commented on patch set 2 03/23/13, 11:21

    Verified; Looks good to me, but someone else must approve
  6. Mr. Jenkins commented on patch set 2 03/23/13, 11:21

  7. Mr. Jenkins commented on patch set 3 03/23/13, 11:21

  8. Nicole Hummel uploaded patch set 2 03/23/13, 11:21

  9. Nicole Hummel commented on patch set 2 03/23/13, 11:21

    Moved the exception to the abstractDriver. So the exception is thrown as before but other drivers are not broken.
  10. Andreas Wolf commented on patch set 3 V 0 03/23/13, 11:21

    by team member; Looks good to me, approved Fixed comments; merging this after my +2 (based on the +1 by Fabien) The issue Alexander mentioned is fixed in a different patch, to better document the issue.
  11. Andreas Wolf merged patch set 4 03/23/13, 11:21