Browse Source

Store url relative again, fix 4439

Dennis Birkholz 9 years ago
parent
commit
9febf55f76
1 changed files with 6 additions and 6 deletions
  1. 6 6
      src/Composer/Repository/PathRepository.php

+ 6 - 6
src/Composer/Repository/PathRepository.php

@@ -101,10 +101,10 @@ class PathRepository extends ArrayRepository
     {
         parent::initialize();
 
-        foreach ($this->getPaths() as $path) {
-            $path = realpath($path) . '/';
-
+        foreach ($this->getUrlMatches() as $url) {
+            $path = realpath($url) . '/';
             $composerFilePath = $path.'composer.json';
+            
             if (!file_exists($composerFilePath)) {
                 continue;
             }
@@ -113,7 +113,7 @@ class PathRepository extends ArrayRepository
             $package = JsonFile::parseJson($json, $composerFilePath);
             $package['dist'] = array(
                 'type' => 'path',
-                'url' => $path,
+                'url' => $url,
                 '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[]
      */
-    private function getPaths()
+    private function getUrlMatches()
     {
         return glob($this->url, GLOB_MARK|GLOB_ONLYDIR);
     }