Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6fc048f
)
Use new stringjoin() function.
author
Wayne Davison
<wayned@samba.org>
Tue, 20 Jan 2004 05:35:57 +0000
(
05:35
+0000)
committer
Wayne Davison
<wayned@samba.org>
Tue, 20 Jan 2004 05:35:57 +0000
(
05:35
+0000)
sender.c
patch
|
blob
|
blame
|
history
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);