X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/1a016bfdec2823c6d4e78a3dcc253cdfc30a10af..de5fb3744da115dbdb66c7fbb894bf2ad9317fb7:/flist.c diff --git a/flist.c b/flist.c index cf401519..d3c07edc 100644 --- a/flist.c +++ b/flist.c @@ -262,6 +262,12 @@ static void receive_file_entry(struct file_struct **fptr, 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;