Merge pull request #16993 from owncloud/verify-if-path-exists

[master] Verify if path exists
This commit is contained in:
Lukas Reschke 2015-06-18 10:05:12 +02:00
commit 8d4f918671
1 changed files with 7 additions and 0 deletions

View File

@ -63,6 +63,13 @@ $view = new \OC\Files\View('/' . $userId . '/files');
$pathId = $linkedItem['file_source'];
$path = $view->getPath($pathId);
if($path === null) {
\OC_Response::setStatus(\OC_Response::STATUS_NOT_FOUND);
\OC_Log::write('core-preview', 'Could not resolve file for shared item', OC_Log::WARN);
exit;
}
$pathInfo = $view->getFileInfo($path);
$sharedFile = null;