From 0bede65947d91d6ebb94bd12a98560ff21260758 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 1 Apr 2014 15:15:03 +0200 Subject: [PATCH] Fix dirInfo check when dir does not exist --- apps/files/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/index.php b/apps/files/index.php index 73601d26217..4d765b69e41 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -40,7 +40,7 @@ $dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : ''; $dir = \OC\Files\Filesystem::normalizePath($dir); $dirInfo = \OC\Files\Filesystem::getFileInfo($dir); // Redirect if directory does not exist -if (!$dirInfo->getType() === 'dir') { +if (!$dirInfo || !$dirInfo->getType() === 'dir') { header('Location: ' . OCP\Util::getScriptName() . ''); exit(); } -- 2.39.5