Merge pull request #16993 from owncloud/verify-if-path-exists
[master] Verify if path exists
This commit is contained in:
commit
8d4f918671
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue