| @@ 768-774 (lines=7) @@ | ||
| 765 | if ($sourceStorage->is_dir($sourceInternalPath)) { |
|
| 766 | $dh = $sourceStorage->opendir($sourceInternalPath); |
|
| 767 | $result = $this->mkdir($targetInternalPath); |
|
| 768 | if (\is_resource($dh)) { |
|
| 769 | while ($result and ($file = \readdir($dh)) !== false) { |
|
| 770 | if (!Filesystem::isIgnoredDir($file)) { |
|
| 771 | $result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file, false, $isRename); |
|
| 772 | } |
|
| 773 | } |
|
| 774 | } |
|
| 775 | } else { |
|
| 776 | try { |
|
| 777 | $source = $sourceStorage->fopen($sourceInternalPath, 'r'); |
|
| @@ 569-575 (lines=7) @@ | ||
| 566 | if ($sourceStorage->is_dir($sourceInternalPath)) { |
|
| 567 | $dh = $sourceStorage->opendir($sourceInternalPath); |
|
| 568 | $result = $this->mkdir($targetInternalPath); |
|
| 569 | if (\is_resource($dh)) { |
|
| 570 | while ($result and ($file = \readdir($dh)) !== false) { |
|
| 571 | if (!Filesystem::isIgnoredDir($file) && !Filesystem::isForbiddenFileOrDir($file)) { |
|
| 572 | $result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file); |
|
| 573 | } |
|
| 574 | } |
|
| 575 | } |
|
| 576 | } else { |
|
| 577 | $source = $sourceStorage->fopen($sourceInternalPath, 'r'); |
|
| 578 | // TODO: call fopen in a way that we execute again all storage wrappers |
|