diff options
author | Björn Schießle <schiessle@owncloud.com> | 2016-04-20 12:12:41 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2016-04-20 12:17:15 +0200 |
commit | 4f438eee569018c461c960b337501a7d558763cb (patch) | |
tree | a529ce12b1c81f15ec0a3033359f0cb71c9eba38 | |
parent | a296cbd203af89a8433f76dbc3a90872d627efda (diff) | |
download | nextcloud-server-4f438eee569018c461c960b337501a7d558763cb.tar.gz nextcloud-server-4f438eee569018c461c960b337501a7d558763cb.zip |
preserve information if it is a rename operation or not
-rw-r--r-- | lib/private/files/storage/wrapper/encryption.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php index 1add4d7fd0a..02da978a700 100644 --- a/lib/private/files/storage/wrapper/encryption.php +++ b/lib/private/files/storage/wrapper/encryption.php @@ -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); } } } |