| @@ 575-581 (lines=7) @@ | ||
| 572 | if ($sourceStorage->is_dir($sourceInternalPath)) { |
|
| 573 | $dh = $sourceStorage->opendir($sourceInternalPath); |
|
| 574 | $result = $this->mkdir($targetInternalPath); |
|
| 575 | if (is_resource($dh)) { |
|
| 576 | while ($result and ($file = readdir($dh)) !== false) { |
|
| 577 | if (!Filesystem::isIgnoredDir($file)) { |
|
| 578 | $result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file); |
|
| 579 | } |
|
| 580 | } |
|
| 581 | } |
|
| 582 | } else { |
|
| 583 | $source = $sourceStorage->fopen($sourceInternalPath, 'r'); |
|
| 584 | // TODO: call fopen in a way that we execute again all storage wrappers |
|
| @@ 733-739 (lines=7) @@ | ||
| 730 | if ($sourceStorage->is_dir($sourceInternalPath)) { |
|
| 731 | $dh = $sourceStorage->opendir($sourceInternalPath); |
|
| 732 | $result = $this->mkdir($targetInternalPath); |
|
| 733 | if (is_resource($dh)) { |
|
| 734 | while ($result and ($file = readdir($dh)) !== false) { |
|
| 735 | if (!Filesystem::isIgnoredDir($file)) { |
|
| 736 | $result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file, false, $isRename); |
|
| 737 | } |
|
| 738 | } |
|
| 739 | } |
|
| 740 | } else { |
|
| 741 | try { |
|
| 742 | $source = $sourceStorage->fopen($sourceInternalPath, 'r'); |
|