From: Vincent Petry Date: Thu, 3 Apr 2014 15:04:13 +0000 (+0200) Subject: Fixed dirInfo check for non existing dir in files ajax call X-Git-Tag: v7.0.0alpha2~504^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7c9537f33aa590c59553cc717738a98ca54bbcb8;p=nextcloud-server.git Fixed dirInfo check for non existing dir in files ajax call --- 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(); }