Store url relative again, fix 4439

main
Dennis Birkholz 9 years ago
parent 1409e32037
commit 9febf55f76

@ -101,10 +101,10 @@ class PathRepository extends ArrayRepository
{ {
parent::initialize(); parent::initialize();
foreach ($this->getPaths() as $path) { foreach ($this->getUrlMatches() as $url) {
$path = realpath($path) . '/'; $path = realpath($url) . '/';
$composerFilePath = $path.'composer.json'; $composerFilePath = $path.'composer.json';
if (!file_exists($composerFilePath)) { if (!file_exists($composerFilePath)) {
continue; continue;
} }
@ -113,7 +113,7 @@ class PathRepository extends ArrayRepository
$package = JsonFile::parseJson($json, $composerFilePath); $package = JsonFile::parseJson($json, $composerFilePath);
$package['dist'] = array( $package['dist'] = array(
'type' => 'path', 'type' => 'path',
'url' => $path, 'url' => $url,
'reference' => '', 'reference' => '',
); );
@ -134,11 +134,11 @@ class PathRepository extends ArrayRepository
} }
/** /**
* Get a list of all path names matching given url (supports globbing). * Get a list of all (possibly relative) path names matching given url (supports globbing).
* *
* @return string[] * @return string[]
*/ */
private function getPaths() private function getUrlMatches()
{ {
return glob($this->url, GLOB_MARK|GLOB_ONLYDIR); return glob($this->url, GLOB_MARK|GLOB_ONLYDIR);
} }

Loading…
Cancel
Save