From d46b7d73e74acb3bb7df653a89dd5300c706c3fa Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Tue, 24 Mar 2015 12:21:25 +0100
Subject: [PATCH] when the path doesnt exist show a proper error page

---
 apps/files_sharing/lib/controllers/sharecontroller.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/apps/files_sharing/lib/controllers/sharecontroller.php b/apps/files_sharing/lib/controllers/sharecontroller.php
index d48e7671cf..2f69583b41 100644
--- a/apps/files_sharing/lib/controllers/sharecontroller.php
+++ b/apps/files_sharing/lib/controllers/sharecontroller.php
@@ -154,6 +154,8 @@ class ShareController extends Controller {
 		if (Filesystem::isReadable($originalSharePath . $path)) {
 			$getPath = Filesystem::normalizePath($path);
 			$originalSharePath .= $path;
+		} else {
+			throw new OCP\Files\NotFoundException();
 		}
 
 		$file = basename($originalSharePath);
-- 
GitLab