file = ©
}
- recv_generator(local_name? local_name
- : f_name_to(file,fbuf,sizeof fbuf), file, i, f);
+ recv_generator(local_name ? local_name : f_name_to(file, fbuf),
+ file, i, f);
}
phase++;
* to catch initial checksum errors */
while ((i = get_redo_num()) != -1) {
struct file_struct *file = flist->files[i];
- recv_generator(local_name? local_name
- : f_name_to(file,fbuf,sizeof fbuf), file, i, f);
+ recv_generator(local_name ? local_name : f_name_to(file, fbuf),
+ file, i, f);
}
phase++;
{
#if SUPPORT_HARD_LINKS
struct file_struct *file;
- char fbuf[MAXPATHLEN];
- char *hlink1, *hlink2;
+ char hlink1[MAXPATHLEN];
+ char *hlink2;
STRUCT_STAT st1, st2;
int i;
for (i = 0; i < hlink_count; i++) {
file = hlink_list[i];
- hlink1 = f_name_to(file, fbuf, sizeof fbuf);
- if (link_stat(hlink1, &st1) != 0)
+ if (link_stat(f_name_to(file, hlink1), &st1) != 0)
continue;
while ((file = file->F_NEXT) != NULL) {
hlink2 = f_name(file);
if (!S_ISDIR(flist->files[j]->mode) ||
!(flist->files[j]->flags & FLAG_DELETE)) continue;
- name = f_name_to(flist->files[j], fbuf, sizeof fbuf);
+ name = f_name_to(flist->files[j], fbuf);
if (!(local_file_list = send_file_list(-1,1,&name)))
continue;
if (local_name)
fname = local_name;
else
- fname = f_name_to(file, fbuf, sizeof fbuf);
+ fname = f_name_to(file, fbuf);
if (dry_run) {
if (!am_server && verbose) { /* log transfer */
for (i = 0; i < flist->count; i++) {
file = flist->files[i];
if (!file->basename || !S_ISDIR(file->mode)) continue;
- recv_generator(local_name? local_name
- : f_name_to(file,fbuf,sizeof fbuf), file, i, -1);
+ recv_generator(local_name ? local_name : f_name_to(file, fbuf),
+ file, i, -1);
}
if (verbose > 2)
rprintf(FINFO, "send_files starting\n");
while (1) {
- int offset = 0;
+ unsigned int offset;
i = read_int(f_in);
if (i == -1) {
if (file->basedir) {
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;
- }
- }
- f_name_to(file, fname + offset, MAXPATHLEN - offset);
+ } else
+ offset = 0;
+ f_name_to(file, fname + offset);
if (verbose > 2)
rprintf(FINFO, "send_files(%d, %s)\n", i, fname);