summaryrefslogtreecommitdiff
path: root/flist.c
diff options
context:
space:
mode:
authorDavid Dykstra <dwd@samba.org>1999-02-24 22:38:36 +0000
committerDavid Dykstra <dwd@samba.org>1999-02-24 22:38:36 +0000
commit53f821f1e6366e3dc67ce33c51d4c7a07017ffdd (patch)
tree2be4f4ba50dfb50ff95f6e3b179d7d79cbacc068 /flist.c
parentb33b791e6ba823589bdee416b91ad9278cb36ef2 (diff)
downloadrsync-53f821f1e6366e3dc67ce33c51d4c7a07017ffdd.tar.gz
Fix a bug with rsync -R --delete from ./ as reported in PR#1532
Diffstat (limited to 'flist.c')
-rw-r--r--flist.c11
1 files changed, 10 insertions, 1 deletions
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) {