allow # netpath in dial string

front
cinap_lenrek 2012-05-22 05:36:57 +02:00
parent f5dd576a50
commit 2c47b855b1
1 changed files with 8 additions and 2 deletions

View File

@ -132,7 +132,7 @@ call(char *clone, char *dest, DS *ds)
char cname[Maxpath], name[Maxpath], data[Maxpath], *p; char cname[Maxpath], name[Maxpath], data[Maxpath], *p;
/* because cs is in a different name space, replace the mount point */ /* because cs is in a different name space, replace the mount point */
if(*clone == '/'){ if(*clone == '/' || *clone == '#'){
p = strchr(clone+1, '/'); p = strchr(clone+1, '/');
if(p == nil) if(p == nil)
p = clone; p = clone;
@ -202,7 +202,13 @@ _dial_string_parse(char *str, DS *ds)
ds->proto = "net"; ds->proto = "net";
ds->rem = ds->buf; ds->rem = ds->buf;
} else { } else {
if(*ds->buf != '/' && *ds->buf != '#'){ p2 = ds->buf;
if(*p2 == '#'){
p2 = strchr(p2, '/');
if(p2 == nil || p2 > p)
p2 = ds->buf;
}
if(*p2 != '/'){
ds->netdir = 0; ds->netdir = 0;
ds->proto = ds->buf; ds->proto = ds->buf;
} else { } else {