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)
|
public static function resolvePath($path)
|
||||||
{
|
{
|
||||||
if (Platform::isWindows()) {
|
return self::$configDir . DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue