public function makeAbsolutePath($path, $prefix)
{
if (substr($path, 0, 1) == '/' || substr($path, 1, 2) == ':\\' || substr($path, 0, 2) == '~/' || substr($path, 0, 2) == '\\\\' || preg_match('|^[a-z]+://|', $path)) {
return $path;
} else {
if (substr($path, 0, 2) == './') {
$path = substr($path, 2);
}
$absPath = $this->fixPath($prefix) . $path;
$count = 1;
while ($count > 0) {
$absPath = preg_replace('|\\w+/\\.\\./|', '', $absPath, -1, $count);
}
return $absPath;
}
}