summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/index.php2
1 files changed, 1 insertions, 1 deletions
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();
}