mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
lib: Assume relative path for Config::resolvePath()
This commit is contained in:
parent
ebca81b040
commit
a18058e185
@ -165,16 +165,6 @@ class Config extends Zend_Config
|
||||
*/
|
||||
public static function resolvePath($path)
|
||||
{
|
||||
if (Platform::isWindows()) {
|
||||
throw new ProgrammingError('Windows support has not yet been implemented');
|
||||
}
|
||||
|
||||
if (strpos(dirname($path), DIRECTORY_SEPARATOR) === 0) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
$path = self::$configDir . DIRECTORY_SEPARATOR . $path;
|
||||
$canonical = realpath($path);
|
||||
return ($canonical === false) ? $path : $canonical;
|
||||
return self::$configDir . DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user