clean_fname(thisname);
+ if (relative_paths && thisname[0] == '/') {
+ /* strip / off absolute paths in destination */
+ memmove(thisname, thisname+1, strlen(thisname));
+ if (!thisname[0]) strcpy(thisname,".");
+ }
+
if ((p = strrchr(thisname,'/'))) {
static char *lastdir;
*p = 0;
d = opendir(dir);
if (!d) {
io_error = 1;
- rprintf(FERROR,"%s: %s\n",
+ rprintf(FERROR,"opendir(%s): %s\n",
dir,strerror(errno));
return;
}
strlcpy(lastpath, fname, sizeof(lastpath)-1);
*p = '/';
for (p=fname+1; (p=strchr(p,'/')); p++) {
+ int copy_links_saved = copy_links;
*p = 0;
+ copy_links = 0;
send_file_name(f, flist, fname, 0, 0);
+ copy_links = copy_links_saved;
*p = '/';
}
} else {