From: Björn Schießle Date: Fri, 10 May 2013 10:05:11 +0000 (+0200) Subject: touch() needs to be performed relative to user/files otherwise ownCloud doesn't execu... X-Git-Tag: v6.0.0alpha2~776^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cc433d47cb102d0dca50b925c7519c803ccce48b;p=nextcloud-server.git touch() needs to be performed relative to user/files otherwise ownCloud doesn't execute the hooks which means that etags aren't updated properly --- 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)));