summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-05-13 16:34:22 +0200
committerRobin Appelman <icewind@owncloud.com>2015-05-18 17:16:13 +0200
commit89959a856c97a7267630a05356aa4f6699e0adc3 (patch)
treefbf0208c6ee3344f1eba375c693756efdfaee4d7
parenta0854b36f012e4c5573a4ed6ea8d074482908c4b (diff)
downloadnextcloud-server-89959a856c97a7267630a05356aa4f6699e0adc3.tar.gz
nextcloud-server-89959a856c97a7267630a05356aa4f6699e0adc3.zip
fix target path for move
-rw-r--r--apps/files_trashbin/lib/trashbin.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index 26a7aeb8033..eeb8c3bb3e2 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);
}
}
}