From 6d1cdb3e4552608998edf23c4eaf682cb68c5f25 Mon Sep 17 00:00:00 2001 From: till Date: Sun, 18 Mar 2012 16:36:03 +0100 Subject: [PATCH] * fixSvnUrl(): to prefix absolute paths with file:// --- src/Composer/Repository/Vcs/SvnDriver.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Composer/Repository/Vcs/SvnDriver.php b/src/Composer/Repository/Vcs/SvnDriver.php index d76629c62..f1ab75d42 100644 --- a/src/Composer/Repository/Vcs/SvnDriver.php +++ b/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? *