|
|
|
@ -627,9 +627,10 @@ class Encryption extends Wrapper { |
|
|
|
* @param string $sourceInternalPath |
|
|
|
* @param string $targetInternalPath |
|
|
|
* @param bool $preserveMtime |
|
|
|
* @param bool $isRename |
|
|
|
* @return bool |
|
|
|
*/ |
|
|
|
public function copyFromStorage(Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) { |
|
|
|
public function copyFromStorage(Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false, $isRename = false) { |
|
|
|
|
|
|
|
// TODO clean this up once the underlying moveFromStorage in OC\Files\Storage\Wrapper\Common is fixed:
|
|
|
|
// - call $this->storage->copyFromStorage() instead of $this->copyBetweenStorage
|
|
|
|
@ -637,7 +638,7 @@ class Encryption extends Wrapper { |
|
|
|
// - copy the copyKeys() call from $this->copyBetweenStorage to this method
|
|
|
|
// - remove $this->copyBetweenStorage
|
|
|
|
|
|
|
|
return $this->copyBetweenStorage($sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime, false); |
|
|
|
return $this->copyBetweenStorage($sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime, $isRename); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -732,7 +733,7 @@ class Encryption extends Wrapper { |
|
|
|
if (is_resource($dh)) { |
|
|
|
while ($result and ($file = readdir($dh)) !== false) { |
|
|
|
if (!Filesystem::isIgnoredDir($file)) { |
|
|
|
$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file); |
|
|
|
$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file, false, $isRename); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|