handle proto:foo urls instead of only proto://foo, allowing for open telnet:localhost

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9628 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2004-10-28 22:29:12 +00:00
parent c06238cbd6
commit 93b4337b18
1 changed files with 5 additions and 2 deletions

View File

@ -45,10 +45,13 @@ main(int argc, char **argv)
} else if (!strncasecmp("application/", *argv, 12)) {
// maybe it's an application-mimetype?
rc = roster.Launch(*argv);
} else if (strstr(*argv, "://")) {
} else if (strstr(*argv, ":")) {
BString mimetype = "application/x-vnd.Be.URL.";
BString arg(*argv);
mimetype.Append(arg, arg.FindFirst("://"));
if (strstr(*argv, "://"))
mimetype.Append(arg, arg.FindFirst("://"));
else
mimetype.Append(arg, arg.FindFirst(":"));
char *args[2] = { *argv, NULL };
rc = roster.Launch(mimetype.String(), 1, args);
if (rc == B_ALREADY_RUNNING)