]> source.dussan.org Git - nextcloud-server.git/commitdiff
touch() needs to be performed relative to user/files otherwise ownCloud doesn't execu...
authorBjörn Schießle <schiessle@owncloud.com>
Fri, 10 May 2013 10:05:11 +0000 (12:05 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Fri, 10 May 2013 10:05:11 +0000 (12:05 +0200)
apps/files_trashbin/lib/trash.php

index 88c71a75ab0b4e843b79497e551567ff0fb07840..7fda855d0c2c2765192a73f71c85e6052da388b7 100644 (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)));