preserve information if it is a rename operation or not
This commit is contained in:
parent
a296cbd203
commit
4f438eee56
1 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue