diff options
Diffstat (limited to 'apps/files/ajax/list.php')
-rw-r--r-- | apps/files/ajax/list.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php index 0be38c3b96f..c8286bc15ca 100644 --- a/apps/files/ajax/list.php +++ b/apps/files/ajax/list.php @@ -11,7 +11,8 @@ OCP\JSON::checkLoggedIn(); // Load the files $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; $dir = \OC\Files\Filesystem::normalizePath($dir); -if (!\OC\Files\Filesystem::is_dir($dir . '/')) { +$dirInfo = \OC\Files\Filesystem::getFileInfo($dir); +if (!$dirInfo->getType() === 'dir') { header("HTTP/1.0 404 Not Found"); exit(); } @@ -20,7 +21,7 @@ $doBreadcrumb = isset($_GET['breadcrumb']); $data = array(); $baseUrl = OCP\Util::linkTo('files', 'index.php') . '?dir='; -$permissions = \OCA\Files\Helper::getDirPermissions($dir); +$permissions = $dirInfo->getPermissions(); // Make breadcrumb if($doBreadcrumb) { |