[Pkg-owncloud-commits] [owncloud] 46/457: fix target path for move

David Prévot taffit at moszumanska.debian.org
Sun Jun 28 20:05:22 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 89959a856c97a7267630a05356aa4f6699e0adc3
Author: Robin Appelman <icewind at owncloud.com>
Date:   Wed May 13 16:34:22 2015 +0200

    fix target path for move
---
 apps/files_trashbin/lib/trashbin.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index 26a7aeb..eeb8c3b 100644
--- a/apps/files_trashbin/lib/trashbin.php
+++ b/apps/files_trashbin/lib/trashbin.php
@@ -279,13 +279,17 @@ class Trashbin {
 				list($versionStorage, $versionsInternalPath) = $rootView->resolvePath($owner . '/files_versions/');
 				/** @var \OC\Files\Storage\Storage $trashStorage */
 				list($trashStorage, $trashInternalPath) = $rootView->resolvePath($user . '/files_trashbin/versions/');
+				/** @var \OC\Files\Storage\Storage $ownerTrashStorage */
+				list($ownerTrashStorage, $ownerTrashInternalPath) = $rootView->resolvePath($owner . '/files_trashbin/versions/');
 
 				foreach ($versions as $v) {
 					$size += $versionStorage->filesize($versionsInternalPath . $v['path'] . '.v' . $v['version']);
 					if ($owner !== $user) {
-						$trashStorage->copyFromStorage($versionStorage, $versionsInternalPath . $v['path'] . '.v' . $v['version'], $owner . $trashInternalPath . $v['name'] . '.v' . $v['version'] . '.d' . $timestamp);
+						$ownerTrashStorage->copyFromStorage($versionStorage, $versionsInternalPath . $v['path'] . '.v' . $v['version'], $ownerTrashInternalPath . $v['name'] . '.v' . $v['version'] . '.d' . $timestamp);
+						$rootView->getUpdater()->update($owner . '/files_trashbin/versions/' . $v['name'] . '.v' . $v['version'] . '.d' . $timestamp);
 					}
-					$trashStorage->moveFromStorage($versionStorage, $versionsInternalPath . $v['path'] . '.v' . $v['version'], $trashInternalPath . $filename . '.v' . $v['version'] . '.d' . $timestamp);
+					$trashStorage->moveFromStorage($versionStorage, $versionsInternalPath . $v['path'] . '.v' . $v['version'], $trashInternalPath . '/' . $filename . '.v' . $v['version'] . '.d' . $timestamp);
+					$rootView->getUpdater()->rename($owner . '/files_versions/' . $v['path'] . '.v' . $v['version'], $user . '/files_trashbin/versions/' . $v['name'] . '.v' . $v['version'] . '.d' . $timestamp);
 				}
 			}
 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list