X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/29110570f843d6d009c0b13ed996a8d2c94efe02..2f326946a17abd0ab4bf3f14e5284c2d04f243c0:/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;