1
0
Fork 0

Store url relative again, fix 4439

pull/4444/head
Dennis Birkholz 2015-09-23 17:51:41 +02:00
parent 1409e32037
commit 9febf55f76
1 changed files with 6 additions and 6 deletions

View File

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