aboutsummaryrefslogtreecommitdiffstats
path: root/gnu/libexec/uucp/libunix/app4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/libexec/uucp/libunix/app4.c')
-rw-r--r--gnu/libexec/uucp/libunix/app4.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/libexec/uucp/libunix/app4.c b/gnu/libexec/uucp/libunix/app4.c
index a3b3787f68fd..d3a243fd7285 100644
--- a/gnu/libexec/uucp/libunix/app4.c
+++ b/gnu/libexec/uucp/libunix/app4.c
@@ -21,7 +21,10 @@ zsappend4 (zdir1, zdir2, zdir3, zfile)
cdir3 = strlen (zdir3);
cfile = strlen (zfile);
zret = zbufalc (cdir1 + cdir2 + cdir3 + cfile + 4);
- memcpy (zret, zdir1, cdir1);
+ if (cdir1 == 1 && *zdir1 == '/')
+ cdir1 = 0;
+ else
+ memcpy (zret, zdir1, cdir1);
memcpy (zret + cdir1 + 1, zdir2, cdir2);
memcpy (zret + cdir1 + cdir2 + 2, zdir3, cdir3);
memcpy (zret + cdir1 + cdir2 + cdir3 + 3, zfile, cfile);