Merge pull request #5803 from nextcloud/fix-public-links

fix preview for public links
This commit is contained in:
Morris Jobke 2017-07-21 09:34:36 +02:00 committed by GitHub
commit 407a500745
1 changed files with 3 additions and 1 deletions

View File

@ -79,10 +79,12 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, funct
\OC\Files\Filesystem::addStorageWrapper('sharePermissions', function ($mountPoint, $storage) use ($share) { \OC\Files\Filesystem::addStorageWrapper('sharePermissions', function ($mountPoint, $storage) use ($share) {
return new \OC\Files\Storage\Wrapper\PermissionsMask(array('storage' => $storage, 'mask' => $share->getPermissions() | \OCP\Constants::PERMISSION_SHARE)); return new \OC\Files\Storage\Wrapper\PermissionsMask(array('storage' => $storage, 'mask' => $share->getPermissions() | \OCP\Constants::PERMISSION_SHARE));
}); });
\OC\Files\Filesystem::logWarningWhenAddingStorageWrapper($previousLog); \OC\Files\Filesystem::logWarningWhenAddingStorageWrapper($previousLog);
OC_Util::tearDownFS();
OC_Util::setupFS($owner); OC_Util::setupFS($owner);
$ownerView = \OC\Files\Filesystem::getView(); $ownerView = new \OC\Files\View('/'. $owner . '/files');
$path = $ownerView->getPath($fileId); $path = $ownerView->getPath($fileId);
$fileInfo = $ownerView->getFileInfo($path); $fileInfo = $ownerView->getFileInfo($path);
$linkCheckPlugin->setFileInfo($fileInfo); $linkCheckPlugin->setFileInfo($fileInfo);