X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/b33b791e6ba823589bdee416b91ad9278cb36ef2..c27f25922e9f59e439228a3c3e0c38342899a80f:/flist.c diff --git a/flist.c b/flist.c index 3a44aa7b..f7ab5a9c 100644 --- a/flist.c +++ b/flist.c @@ -638,7 +638,16 @@ struct file_list *send_file_list(int f,int argc,char *argv[]) l = strlen(fname); if (l != 1 && fname[l-1] == '/') { - strlcat(fname,".",MAXPATHLEN); + if ((l == 2) && (fname[0] == '.')) { + /* Turn ./ into just . rather than ./. + This was put in to avoid a problem with + rsync -aR --delete from ./ + The send_file_name() below of ./ was + mysteriously preventing deletes */ + fname[1] = 0; + } else { + strlcat(fname,".",MAXPATHLEN); + } } if (link_stat(fname,&st) != 0) {