Merge pull request #3303 from owncloud/update_etags_on_restore

Make sure that etags get updated once a file gets retored from the trash bin
This commit is contained in:
Morris Jobke 2013-05-13 08:12:57 -07:00
commit d980ee9d9f
1 changed files with 4 additions and 1 deletions

View File

@ -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)));