diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-04-01 16:51:30 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-04-01 16:51:30 +0200 |
commit | 0e93c3fd9a969594661fd3165f91878759ef3003 (patch) | |
tree | f61d5eb800ce4cb98ab5b5ed87c9216f816e89b4 | |
parent | 017d7953d74ffe8422dad41d2c0a80ef89ddff0f (diff) | |
parent | 0bede65947d91d6ebb94bd12a98560ff21260758 (diff) | |
download | nextcloud-server-0e93c3fd9a969594661fd3165f91878759ef3003.tar.gz nextcloud-server-0e93c3fd9a969594661fd3165f91878759ef3003.zip |
Merge pull request #7986 from owncloud/files-fixredirectwhendirnotexists
Fix dirInfo check when dir does not exist
-rw-r--r-- | apps/files/index.php | 2 |
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(); } |