Commit 53f821f1 authored by David Dykstra's avatar David Dykstra

Fix a bug with rsync -R --delete from ./ as reported in PR#1532

parent b33b791e
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment