From 7c9537f33aa590c59553cc717738a98ca54bbcb8 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 3 Apr 2014 17:04:13 +0200 Subject: [PATCH] Fixed dirInfo check for non existing dir in files ajax call --- apps/files/ajax/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php index 0ffae22ec31..2d76b685018 100644 --- a/apps/files/ajax/list.php +++ b/apps/files/ajax/list.php @@ -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(); } -- 2.39.5