From 4da91f6d3853f8ed6447df843bec305a09e88fd9 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Fri, 4 Jul 2014 18:22:07 +0300 Subject: [PATCH 1/2] Use getPath instead of shareInfo --- lib/file.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/file.php b/lib/file.php index a880aa06..2532c2ab 100644 --- a/lib/file.php +++ b/lib/file.php @@ -157,7 +157,6 @@ class File { throw new \Exception($this->fileId . ' is a broken share'); } $view = new View('/' . $owner . '/files'); - $path = $rootLinkItem['file_target']; } else { $owner = \OCP\User::getUser(); $root = '/' . $owner; @@ -165,9 +164,9 @@ class File { $root .= '/' . 'files'; } $view = new View($root); - $path = $view->getPath($this->fileId); } + $path = $view->getPath($this->fileId); if (!$path){ throw new \Exception($this->fileId . ' can not be resolved'); } From 78e8163c78710b432e4c3879c88b721b98ee642d Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Fri, 4 Jul 2014 19:10:25 +0300 Subject: [PATCH 2/2] Use owner FS for guests --- lib/file.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/file.php b/lib/file.php index 2532c2ab..02028164 100644 --- a/lib/file.php +++ b/lib/file.php @@ -153,6 +153,9 @@ class File { $rootLinkItem = \OCP\Share::resolveReShare($this->sharing[0]); if (isset($rootLinkItem['uid_owner'])){ $owner = $rootLinkItem['uid_owner']; + \OCP\JSON::checkUserExists($rootLinkItem['uid_owner']); + \OC_Util::tearDownFS(); + \OC_Util::setupFS($rootLinkItem['uid_owner']); } else { throw new \Exception($this->fileId . ' is a broken share'); }