diff options
author | David Dykstra <dwd@samba.org> | 1999-02-24 22:38:36 +0000 |
---|---|---|
committer | David Dykstra <dwd@samba.org> | 1999-02-24 22:38:36 +0000 |
commit | 53f821f1e6366e3dc67ce33c51d4c7a07017ffdd (patch) | |
tree | 2be4f4ba50dfb50ff95f6e3b179d7d79cbacc068 /flist.c | |
parent | b33b791e6ba823589bdee416b91ad9278cb36ef2 (diff) | |
download | rsync-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.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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) { |