Do not respond if path is empty

This commit is contained in:
Victor Dubiniuk 2014-05-14 19:31:13 +03:00
parent 14398d6979
commit 1c6a7287f0

View File

@ -14,5 +14,10 @@ namespace OCA\Documents;
\OCP\JSON::checkLoggedIn();
$download = new Download(\OCP\User::getUser(), '/files' . @$_GET['path']);
$path = Helper::getArrayValueByKey($_GET, 'path');
if (!empty($path)){
$fullPath = '/files' . $path;
$download = new Download(\OCP\User::getUser(), $fullPath);
$download->sendResponse();
}
exit();