| @@ 543-549 (lines=7) @@ | ||
| 540 | if ($sourceStorage->is_dir($sourceInternalPath)) { |
|
| 541 | $dh = $sourceStorage->opendir($sourceInternalPath); |
|
| 542 | $result = $this->mkdir($targetInternalPath); |
|
| 543 | if (is_resource($dh)) { |
|
| 544 | while ($result and ($file = readdir($dh)) !== false) { |
|
| 545 | if (!Filesystem::isIgnoredDir($file)) { |
|
| 546 | $result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file); |
|
| 547 | } |
|
| 548 | } |
|
| 549 | } |
|
| 550 | } else { |
|
| 551 | $source = $sourceStorage->fopen($sourceInternalPath, 'r'); |
|
| 552 | // TODO: call fopen in a way that we execute again all storage wrappers |
|
| @@ 632-638 (lines=7) @@ | ||
| 629 | if ($sourceStorage->is_dir($sourceInternalPath)) { |
|
| 630 | $dh = $sourceStorage->opendir($sourceInternalPath); |
|
| 631 | $result = $this->mkdir($targetInternalPath); |
|
| 632 | if (is_resource($dh)) { |
|
| 633 | while ($result and ($file = readdir($dh)) !== false) { |
|
| 634 | if (!Filesystem::isIgnoredDir($file)) { |
|
| 635 | $result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file); |
|
| 636 | } |
|
| 637 | } |
|
| 638 | } |
|
| 639 | } else { |
|
| 640 | $source = $sourceStorage->fopen($sourceInternalPath, 'r'); |
|
| 641 | $target = $this->fopen($targetInternalPath, 'w'); |
|