diff --git a/src/WINNT/afsd/fs.c b/src/WINNT/afsd/fs.c index 41af2042f9..c631b41075 100644 --- a/src/WINNT/afsd/fs.c +++ b/src/WINNT/afsd/fs.c @@ -2317,11 +2317,12 @@ MakeMountCmd(struct cmd_syndesc *as, void *arock) exit(1); } if (parent[0] == '\\' && parent[1] == '\\' && - parent[len+2] == '\\' && - parent[len+3] == '\0' && + (parent[len+2] == '\\' && parent[len+3] == '\0' || parent[len+2] == '\0') && !strnicmp(nbname,&parent[2],len)) { - if( FAILED(StringCbPrintf(path, sizeof(path),"%sall\\%s", parent, &as->parms[0].items->data[len+2]))) { + if( FAILED(StringCbPrintf(path, sizeof(path),"%s%sall%s", parent, + parent[len+2]?"":"\\", + &as->parms[0].items->data[len+2]))) { fprintf (stderr, "path - cannot be populated"); exit(1); } diff --git a/src/WINNT/afsd/symlink.c b/src/WINNT/afsd/symlink.c index 9edaeb5d64..72db0d8bb1 100644 --- a/src/WINNT/afsd/symlink.c +++ b/src/WINNT/afsd/symlink.c @@ -448,11 +448,11 @@ static MakeLinkCmd(struct cmd_syndesc *as, void *arock) int len = (int)strlen(nbname); if (parent[0] == '\\' && parent[1] == '\\' && - parent[len+2] == '\\' && - parent[len+3] == '\0' && + (parent[len+2] == '\\' && parent[len+3] == '\0' || parent[len+2] == '\0') && !strnicmp(nbname,&parent[2],len)) { - sprintf(path,"%sall\\%s", parent, &as->parms[0].items->data[strlen(parent)]); + sprintf(path,"%s%sall%s", parent, parent[len+2]?"":"\\", + &as->parms[0].items->data[strlen(parent)]); parent = Parent(path); if (!InAFS(parent)) { fprintf(stderr,"%s: symlinks must be created within the AFS file system\n", pn);