summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files_trashbin/lib/trash.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/trash.php b/apps/files_trashbin/lib/trash.php
index 88c71a75ab0..7fda855d0c2 100644
--- a/apps/files_trashbin/lib/trash.php
+++ b/apps/files_trashbin/lib/trash.php
@@ -266,7 +266,10 @@ class Trashbin {
// handle the restore result
if( $restoreResult ) {
- $view->touch($target.$ext, $mtime);
+ $fakeRoot = $view->getRoot();
+ $view->chroot('/'.$user.'/files');
+ $view->touch('/'.$location.'/'.$filename.$ext, $mtime);
+ $view->chroot($fakeRoot);
\OCP\Util::emitHook('\OCA\Files_Trashbin\Trashbin', 'post_restore',
array('filePath' => \OC\Files\Filesystem::normalizePath('/'.$location.'/'.$filename.$ext),
'trashPath' => \OC\Files\Filesystem::normalizePath($file)));