Fix previews for federated shares

The owner of a federated file is the federated user. For which we
obviously can't setup a view.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2016-11-24 13:20:51 +01:00
parent f4cf125a4a
commit dab87ef6fd
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@ class GeneratorHelper {
* This is required to create the old view and path
*/
private function getViewAndPath(File $file) {
$owner = $file->getOwner()->getUID();
$absPath = ltrim($file->getPath(), '/');
$owner = explode('/', $absPath)[0];
$userFolder = $this->rootFolder->getUserFolder($owner)->getParent();