Commit 4034cb3f authored by Wayne Davison's avatar Wayne Davison

Use new stringjoin() function.

parent 6fc048f4
......@@ -159,15 +159,14 @@ void send_files(struct file_list *flist, int f_out, int f_in)
fname[0] = 0;
if (file->basedir) {
strlcpy(fname, file->basedir, MAXPATHLEN);
if (strlen(fname) == MAXPATHLEN-1) {
offset = stringjoin(fname, sizeof fname,
file->basedir, "/", NULL);
if (offset >= MAXPATHLEN-1) {
io_error |= IOERR_GENERAL;
rprintf(FERROR, "send_files failed on long-named directory %s\n",
full_fname(fname));
return;
}
strlcat(fname, "/", MAXPATHLEN);
offset = strlen(file->basedir)+1;
}
f_name_to(file, fname + offset, MAXPATHLEN - offset);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment