summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Forsyth <charles.forsyth@gmail.com>2014-06-16 11:26:10 +0100
committerCharles Forsyth <charles.forsyth@gmail.com>2014-06-16 11:26:10 +0100
commit65d92bf32a3c774a6e0f693a756a8cd9a1f63737 (patch)
treec24efdb5cddd7c3bcdcb24e4e3ef6c327b7200b1
parente6c08bcaa1d08633fffeaac7d7cfd5d32f9db755 (diff)
issue 315: rewrite cs output to use correct network directory
-rw-r--r--os/port/dial.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/os/port/dial.c b/os/port/dial.c
index d07671dc..cac5b484 100644
--- a/os/port/dial.c
+++ b/os/port/dial.c
@@ -411,7 +411,14 @@ nettrans(char *addr, char *naddr, int na, char *file, int nf)
*p++ = 0;
strncpy(naddr, p, na);
naddr[na-1] = 0;
- strncpy(file, buf, nf);
- file[nf-1] = 0;
+
+ if(buf[0] == '/'){
+ p = strchr(buf+1, '/');
+ if(p == nil)
+ p = buf;
+ else
+ p++;
+ }
+ snprint(file, nf, "%s/%s", netdir, p);
return 0;
}