diff options
author | blizzz <blizzz@owncloud.com> | 2013-03-04 04:38:24 -0800 |
---|---|---|
committer | blizzz <blizzz@owncloud.com> | 2013-03-04 04:38:24 -0800 |
commit | ef70978524ad0f00c3e5f03a489753547afee45a (patch) | |
tree | a15b7929f6f431367d1f5bc5136ee06d12d3c8e1 | |
parent | d4ea381040fbe0a4f74d355c1f26643fdf5ab472 (diff) | |
parent | d23702d3241643a8061cad129716e7582e81220b (diff) | |
download | nextcloud-server-ef70978524ad0f00c3e5f03a489753547afee45a.tar.gz nextcloud-server-ef70978524ad0f00c3e5f03a489753547afee45a.zip |
Merge pull request #2073 from owncloud/trashbin_userHome
make trashbin work with different user homes
-rw-r--r-- | apps/files_trashbin/lib/trash.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_trashbin/lib/trash.php b/apps/files_trashbin/lib/trash.php index 4b7e9abd92d..2fc8a8bc3c6 100644 --- a/apps/files_trashbin/lib/trash.php +++ b/apps/files_trashbin/lib/trash.php @@ -77,13 +77,13 @@ class Trashbin { // Take care of file versions if ( \OCP\App::isEnabled('files_versions') ) { - if ( $view->is_dir('files_versions'.$file_path) ) { + if ( $view->is_dir('files_versions/'.$file_path) ) { $trashbinSize += self::calculateSize(new \OC\Files\View('/'. $user.'/files_versions/'.$file_path)); - $view->rename('files_versions'.$file_path, 'files_trashbin/versions'. $deleted.'.d'.$timestamp); + $view->rename('files_versions/'.$file_path, 'files_trashbin/versions'. $deleted.'.d'.$timestamp); } else if ( $versions = \OCA\Files_Versions\Storage::getVersions($user, $file_path) ) { foreach ($versions as $v) { $trashbinSize += $view->filesize('files_versions'.$v['path'].'.v'.$v['version']); - $view->rename('files_versions'.$v['path'].'.v'.$v['version'], 'files_trashbin/versions'. $deleted.'.v'.$v['version'].'.d'.$timestamp); + $view->rename('files_versions'.$v['path'].'.v'.$v['version'], 'files_trashbin/versions/'. $deleted.'.v'.$v['version'].'.d'.$timestamp); } } } @@ -417,7 +417,7 @@ class Trashbin { */ private static function getVersionsFromTrash($filename, $timestamp) { $view = new \OC\Files\View('/'.\OCP\User::getUser().'/files_trashbin/versions'); - $versionsName = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath($filename); + $versionsName = $view->getLocalFile($filename); $versions = array(); if ($timestamp ) { // fetch for old versions |