From 53f821f1e6366e3dc67ce33c51d4c7a07017ffdd Mon Sep 17 00:00:00 2001 From: David Dykstra Date: Wed, 24 Feb 1999 22:38:36 +0000 Subject: [PATCH] Fix a bug with rsync -R --delete from ./ as reported in PR#1532 --- flist.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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) { -- 2.34.1