Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Use the new push_dir() and pop_dir() calling syntax.
[rsync/rsync.git]
/
sender.c
diff --git
a/sender.c
b/sender.c
index
da51cb4
..
8b649a8
100644
(file)
--- a/
sender.c
+++ b/
sender.c
@@
-159,15
+159,14
@@
void send_files(struct file_list *flist, int f_out, int f_in)
fname[0] = 0;
if (file->basedir) {
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;
}
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);
}
f_name_to(file, fname + offset, MAXPATHLEN - offset);