summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6ed807f)
raw | patch | inline | side by side (parent: 6ed807f)
author | Johannes Sixt <johannes.sixt@telecom.at> | |
Fri, 30 Nov 2007 21:51:10 +0000 (22:51 +0100) | ||
committer | Johannes Sixt <johannes.sixt@telecom.at> | |
Thu, 26 Jun 2008 06:45:08 +0000 (08:45 +0200) |
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>
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>
connect.c | patch | blob | history | |
transport.c | patch | blob | history |
diff --git a/connect.c b/connect.c
index e92af2973565197f2f001c45c6059f9a838fe289..574f42fa47ffa69328217eb25afee6f85db9595e 100644 (file)
--- a/connect.c
+++ b/connect.c
end = host;
path = strchr(end, c);
- if (path) {
+ if (path && !has_dos_drive_prefix(end)) {
if (c == ':') {
protocol = PROTO_SSH;
*path++ = '\0';
diff --git a/transport.c b/transport.c
index 3ff851935ff8d018a926084b89cb31bbb3d30a07..4145eed9794a956b05967f049fe2caedcaa67feb 100644 (file)
--- a/transport.c
+++ b/transport.c
{
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)