]> 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>
Tue, 14 May 2013 09:34:40 +0000 (11:34 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Tue, 14 May 2013 09:34:40 +0000 (11:34 +0200)
.gitignore
apps/files_trashbin/lib/trash.php

index 40d6e6ca0fe0c3d38ee57cc4c4f7cff3116d4b1c..4daa37abf2ca7c39bf5b51b466bfb1fa2a0dbf03 100644 (file)
@@ -73,3 +73,4 @@ data-autotest
 /tests/coverage*
 /tests/autoconfig*
 /tests/autotest*
+/l10n/.tx/
\ No newline at end of file
index f0b56eef01403ce3bf12493916614b7070be6f73..c1837e0deeeefc4476251a1e4d820d42071c7059 100644 (file)
@@ -158,7 +158,10 @@ class Trashbin {
                $ext = self::getUniqueExtension($location, $filename, $view);
                $mtime = $view->filemtime($source);
                if( $view->rename($source, $target.$ext) ) {
-                       $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)));