diff options
author | Björn Schießle <schiessle@owncloud.com> | 2014-01-15 06:57:33 -0800 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2014-01-15 06:57:33 -0800 |
commit | 5163e648f8af52c9aa4266d725f015e55921b6fa (patch) | |
tree | 3f2f2c7aafcdab9761c2b032eb3a8819d5a3761f | |
parent | f0a3c2a0f478933f63365653055ecd4700df8bce (diff) | |
parent | 592ae166037a42a3a06d41d42369ad0910e93747 (diff) | |
download | nextcloud-server-5163e648f8af52c9aa4266d725f015e55921b6fa.tar.gz nextcloud-server-5163e648f8af52c9aa4266d725f015e55921b6fa.zip |
Merge pull request #6780 from owncloud/trash_bin_copy_recursively
copy files to owners trash recursively
-rw-r--r-- | apps/files_encryption/lib/proxy.php | 4 | ||||
-rw-r--r-- | apps/files_trashbin/lib/trashbin.php | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 41f352d853a..4fe76b97711 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -255,8 +255,8 @@ class Proxy extends \OC_FileProxy { // split the path parts $pathParts = explode('/', $path); - // FIXME: handling for /userId/cache used by webdav for chunking. The cache chunks are NOT encrypted - if (isset($pathParts[2]) && $pathParts[2] === 'cache') { + // don't try to encrypt/decrypt cache chunks or files in the trash bin + if (isset($pathParts[2]) && ($pathParts[2] === 'cache' || $pathParts[2] === 'files_trashbin')) { return $result; } diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php index 567f88b91b1..769fd8d8990 100644 --- a/apps/files_trashbin/lib/trashbin.php +++ b/apps/files_trashbin/lib/trashbin.php @@ -189,7 +189,7 @@ class Trashbin { if ($rootView->is_dir($owner . '/files_versions/' . $ownerPath)) { $size += self::calculateSize(new \OC\Files\View('/' . $owner . '/files_versions/' . $ownerPath)); if ($owner !== $user) { - $rootView->copy($owner . '/files_versions/' . $ownerPath, $owner . '/files_trashbin/versions/' . basename($ownerPath) . '.d' . $timestamp); + self::copy_recursive($owner . '/files_versions/' . $ownerPath, $owner . '/files_trashbin/versions/' . basename($ownerPath) . '.d' . $timestamp, $rootView); } $rootView->rename($owner . '/files_versions/' . $ownerPath, $user . '/files_trashbin/versions/' . $filename . '.d' . $timestamp); } else if ($versions = \OCA\Files_Versions\Storage::getVersions($owner, $ownerPath)) { @@ -247,7 +247,7 @@ class Trashbin { if ($rootView->is_dir($keyfile)) { $size += self::calculateSize(new \OC\Files\View($keyfile)); if ($owner !== $user) { - $rootView->copy($keyfile, $owner . '/files_trashbin/keyfiles/' . basename($ownerPath) . '.d' . $timestamp); + self::copy_recursive($keyfile, $owner . '/files_trashbin/keyfiles/' . basename($ownerPath) . '.d' . $timestamp, $rootView); } $rootView->rename($keyfile, $user . '/files_trashbin/keyfiles/' . $filename . '.d' . $timestamp); } else { @@ -265,7 +265,7 @@ class Trashbin { if ($rootView->is_dir($sharekeys)) { $size += self::calculateSize(new \OC\Files\View($sharekeys)); if ($owner !== $user) { - $rootView->copy($sharekeys, $owner . '/files_trashbin/share-keys/' . basename($ownerPath) . '.d' . $timestamp); + self::copy_recursive($sharekeys, $owner . '/files_trashbin/share-keys/' . basename($ownerPath) . '.d' . $timestamp, $rootView); } $rootView->rename($sharekeys, $user . '/files_trashbin/share-keys/' . $filename . '.d' . $timestamp); } else { |