ensure rootDir has a leading DIRECTORY_SEP

This commit is contained in:
Uwe Steinmann 2026-01-22 13:40:32 +01:00
parent 80321c12fe
commit 5fd791bbf6

View File

@ -645,11 +645,11 @@ class Settings { /* {{{ */
if($node) {
$tab = $node[0]->attributes();
$this->_rootDir = strval($tab["rootDir"]);
$this->_rootDir = rtrim($this->_rootDir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
$this->_baseUrl = strval($tab["baseUrl"]);
$this->_httpRoot = strval($tab["httpRoot"]);
$this->_contentDir = strval($tab["contentDir"]);
if($this->_contentDir && substr($this->_contentDir, -1, 1) != DIRECTORY_SEPARATOR)
$this->_contentDir .= DIRECTORY_SEPARATOR;
$this->_contentDir = rtrim($this->_contentDir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
$this->_cacheDir = strval($tab["cacheDir"]);
$this->_stagingDir = strval($tab["stagingDir"]);
$this->_luceneDir = strval($tab["luceneDir"]);