case 'o': n = op; break;
case 'f':
pathjoin(buf2, sizeof buf2,
- file->basedir ? file->basedir : "",
- f_name(file));
+ am_sender && file->dir.root ? file->dir.root : "",
+ safe_fname(f_name(file)));
clean_fname(buf2, 0);
n = buf2;
if (*n == '/') n++;
l = strlen(n);
if (l + ((int)(s - &buf[0])) >= sizeof(buf)) {
- rprintf(FERROR,"buffer overflow expanding %%%c - exiting\n",
+ rprintf(FERROR,
+ "buffer overflow expanding %%%c -- exiting\n",
p[0]);
exit_cleanup(RERR_MESSAGEIO);
}
memmove(s+(l-1), s+1, strlen(s+1)+1);
}
- /* Copy in n but NOT its nul, because the format sting
+ /* Copy in n but NOT its nul, because the format string
* probably continues after this. */
memcpy(p, n, l);