소스 검색

* fixSvnUrl(): to prefix absolute paths with file://

till 13 년 전
부모
커밋
6d1cdb3e45
1개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 15 0
      src/Composer/Repository/Vcs/SvnDriver.php

+ 15 - 0
src/Composer/Repository/Vcs/SvnDriver.php

@@ -331,6 +331,21 @@ class SvnDriver extends VcsDriver
         return $exit === 0;
     }
 
+    /**
+     * An absolute path (leading '/') is converted to a file:// url.
+     *
+     * @param string $url
+     *
+     * @return string
+     */
+    protected static function fixSvnUrl($url)
+    {
+        if (strpos($url, '/', 0) === 0) {
+            $url = 'file://' . $url;
+        }
+        return $url;
+    }
+
     /**
      * This is quick and dirty - thoughts?
      *