lib: Assume relative path for Config::resolvePath()

This commit is contained in:
Alexander Klimov 2014-06-25 11:43:39 +02:00
parent ebca81b040
commit a18058e185
1 changed files with 1 additions and 11 deletions

View File

@ -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);
}
}