]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixed dirInfo check for non existing dir in files ajax call
authorVincent Petry <pvince81@owncloud.com>
Thu, 3 Apr 2014 15:04:13 +0000 (17:04 +0200)
committerVincent Petry <pvince81@owncloud.com>
Thu, 3 Apr 2014 15:04:13 +0000 (17:04 +0200)
apps/files/ajax/list.php

index 0ffae22ec316979730836f4f3dbe644e95b5512e..2d76b685018fec0f690b154672ae0f5c149774bd 100644 (file)
@@ -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();
 }