Skip to content
Snippets Groups Projects
Commit 8d4f9186 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

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

[master] Verify if path exists
parents c4cb34da 414896d8
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment