]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Fix #2474 error 404 if document root path uses link with ending slash -...
authorMarcin Haba <marcin.haba@bacula.pl>
Thu, 23 May 2019 05:06:25 +0000 (07:06 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Sat, 25 May 2019 13:04:49 +0000 (15:04 +0200)
gui/baculum/protected/Common/Class/BaculumPage.php

index 1327f7f395e8151b1ffb36449236391c0da5532e..783e6c92c760b9efe4b503f6a72b3280cbe6a7a7 100644 (file)
@@ -114,7 +114,9 @@ class BaculumPage extends TPage {
                for($i = 0; $i < count($dirs); $i++) {
                        $document_root_part =  implode('/', $root_dir) . '/' . $dirs[$i];
                        if (is_link($document_root_part)) {
-                               $root_dir = array(readlink($document_root_part));
+                               $temp = readlink($document_root_part);
+                               $temp = rtrim($temp, '/');
+                               $root_dir = array($temp);
                        } else {
                                $root_dir[] = $dirs[$i];
                        }