1
0
Fork 0

Fix directory handling when auto-loading files.

pull/950/head
Taylor Otwell 2012-07-27 09:03:25 -05:00
parent 4e9e66a957
commit a834efe7c9
1 changed files with 1 additions and 5 deletions

View File

@ -127,11 +127,7 @@ EOF;
$filesCode = ""; $filesCode = "";
$autoloads['files'] = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($autoloads['files'])); $autoloads['files'] = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($autoloads['files']));
foreach ($autoloads['files'] as $functionFile) { foreach ($autoloads['files'] as $functionFile) {
if (!$filesystem->isAbsolutePath($functionFile)) { $filesCode .= ' require '.$this->getPathCode($filesystem, $relVendorPath, $vendorPath, $functionFile).";\n";
$functionFile = getcwd() . '/'. $functionFile;
}
$filesCode .= ' require __DIR__ . '. var_export('/'.$filesystem->findShortestPath($vendorPath, $functionFile), true).";\n";
} }
file_put_contents($targetDir.'/autoload_namespaces.php', $namespacesFile); file_put_contents($targetDir.'/autoload_namespaces.php', $namespacesFile);