1
0
Fork 0

Fix shortest absolute paths from cwd to classmap path

pull/1743/head
Sander Marechal 2013-03-29 17:09:39 +01:00
parent bf307de1d6
commit d7697574ff
1 changed files with 6 additions and 2 deletions

View File

@ -158,8 +158,12 @@ EOF;
$autoloads['classmap'] = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($autoloads['classmap']));
foreach ($autoloads['classmap'] as $dir) {
foreach (ClassMapGenerator::createMap($dir) as $class => $path) {
$path = '/'.$filesystem->findShortestPath(getcwd(), $path, true);
$classMap[$class] = '$baseDir . '.var_export($path, true).",\n";
$path = $filesystem->findShortestPath(getcwd(), $path, true);
if ($path[0] == '/') {
$classMap[$class] = var_export($path, true).",\n";
} else {
$classMap[$class] = '$baseDir . '.var_export('/'.$path, true).",\n";
}
}
}