summaryrefslogtreecommitdiff
path: root/emu/port/dial.c
diff options
context:
space:
mode:
authorCharles Forsyth <charles.forsyth@gmail.com>2014-06-16 11:15:42 +0100
committerCharles Forsyth <charles.forsyth@gmail.com>2014-06-16 11:15:42 +0100
commite6c08bcaa1d08633fffeaac7d7cfd5d32f9db755 (patch)
treea5eea837988602340627e6e9aa561c217840f403 /emu/port/dial.c
parent0f34fd5142bb6839ba3826a2e6649fdd100e8525 (diff)
issue 315: point into the right network directory
Diffstat (limited to 'emu/port/dial.c')
-rw-r--r--emu/port/dial.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/emu/port/dial.c b/emu/port/dial.c
index 97930c16..9e1151ff 100644
--- a/emu/port/dial.c
+++ b/emu/port/dial.c
@@ -408,7 +408,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;
}