Skip to content
Snippets Groups Projects
Commit 7c9537f3 authored by Vincent Petry's avatar Vincent Petry
Browse files

Fixed dirInfo check for non existing dir in files ajax call

parent 2b8bb012
Branches
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ OCP\JSON::checkLoggedIn();
$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
$dir = \OC\Files\Filesystem::normalizePath($dir);
$dirInfo = \OC\Files\Filesystem::getFileInfo($dir);
if (!$dirInfo->getType() === 'dir') {
if (!$dirInfo || !$dirInfo->getType() === 'dir') {
header("HTTP/1.0 404 Not Found");
exit();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment