diff options
author | Morris Jobke <morris.jobke@gmail.com> | 2013-05-13 08:12:57 -0700 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2013-05-13 08:12:57 -0700 |
commit | d980ee9d9fed6cdab7377a8d2994584abdc52e05 (patch) | |
tree | 77ed34a779a91b3eed44fdd38992f171465d9889 | |
parent | 1ec92b6377ee784c6e067a8d7e7c10ebf89367e4 (diff) | |
parent | 0ef85907732a2a5cb9cd3b23262abccf8335789d (diff) | |
download | nextcloud-server-d980ee9d9fed6cdab7377a8d2994584abdc52e05.tar.gz nextcloud-server-d980ee9d9fed6cdab7377a8d2994584abdc52e05.zip |
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
-rw-r--r-- | apps/files_trashbin/lib/trash.php | 5 |
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))); |