ref: 2c47b855b1ea9f9c0fd66f14bda93ff6a33a5df9
parent: f5dd576a50a1266291dfc99f8a55373bc5f53d01
author: cinap_lenrek <[email protected]>
date: Tue May 22 01:36:57 EDT 2012
allow # netpath in dial string
--- a/sys/src/libc/9sys/dial.c
+++ b/sys/src/libc/9sys/dial.c
@@ -132,7 +132,7 @@
char cname[Maxpath], name[Maxpath], data[Maxpath], *p;
/* because cs is in a different name space, replace the mount point */
- if(*clone == '/'){
+ if(*clone == '/' || *clone == '#'){
p = strchr(clone+1, '/');
if(p == nil)
p = clone;
@@ -202,7 +202,13 @@
ds->proto = "net";
ds->rem = ds->buf;
} 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->proto = ds->buf;
} else {