From 65d92bf32a3c774a6e0f693a756a8cd9a1f63737 Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Mon, 16 Jun 2014 11:26:10 +0100 Subject: issue 315: rewrite cs output to use correct network directory --- os/port/dial.c | 11 +++++++++-- 1 file 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; } -- cgit v1.2.3