aboutsummaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-11-30 22:51:10 +0100
committerJohannes Sixt <johannes.sixt@telecom.at>2008-06-26 08:45:08 +0200
commitbe501813d25bedc1a441940f349fb91bd9fa4ef6 (patch)
tree7a4da16af830119e98fcd0ed52a5e3502d68bd30 /transport.c
parent6ed807f8432c558ef102c94cb2e8ae4e03c48d4e (diff)
downloadgit-be501813d25bedc1a441940f349fb91bd9fa4ef6.tar.gz
git-be501813d25bedc1a441940f349fb91bd9fa4ef6.tar.xz
Windows: Disambiguate DOS style paths from SSH URLs.
If on Windows a path is specified as C:/path, then this is also a valid SSH URL. To disambiguate between the two interpretations we take an URL that looks like a path with a drive letter as a local URL. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/transport.c b/transport.c
index 3ff851935..4145eed97 100644
--- a/transport.c
+++ b/transport.c
@@ -709,7 +709,8 @@ static int is_local(const char *url)
{
const char *colon = strchr(url, ':');
const char *slash = strchr(url, '/');
- return !colon || (slash && slash < colon);
+ return !colon || (slash && slash < colon) ||
+ has_dos_drive_prefix(url);
}
static int is_file(const char *url)