summaryrefslogtreecommitdiffstats
path: root/apps/files/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/index.php')
-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 7e767cc8a4f..104cf1a55d3 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -36,7 +36,7 @@ OCP\App::setActiveNavigationEntry('files_index');
$dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : '';
// Redirect if directory does not exist
if (!\OC\Files\Filesystem::is_dir($dir . '/')) {
- header('Location: ' . $_SERVER['SCRIPT_NAME'] . '');
+ header('Location: ' . OCP\Util::getScriptName() . '');
exit();
}