X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/6cc119828892f4c28fc55274e11055f8c420515c..e7c67065c060d500eba8d073da9568db2c658aad:/sender.c diff --git a/sender.c b/sender.c index b19ecb54..db7974c3 100644 --- a/sender.c +++ b/sender.c @@ -1,21 +1,24 @@ /* - Copyright (C) Andrew Tridgell 1996 - Copyright (C) Paul Mackerras 1996 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ + * Routines only used by the sending process. + * + * Copyright (C) 1996 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" @@ -133,11 +136,9 @@ void successful_send(int ndx) file->dir.root, "/", NULL); } else offset = 0; - f_name_to(file, fname + offset); - if (remove_sent_files && do_unlink(fname) == 0 && verbose > 1) { - rprintf(FINFO, "sender removed %s\n", - safe_fname(fname + offset)); - } + f_name(file, fname + offset); + if (remove_sent_files && do_unlink(fname) == 0 && verbose > 1) + rprintf(FINFO, "sender removed %s\n", fname + offset); } static void write_ndx_and_attrs(int f_out, int ndx, int iflags, @@ -256,7 +257,7 @@ void send_files(struct file_list *flist, int f_out, int f_in) fname[offset++] = '/'; } else offset = 0; - fname2 = f_name_to(file, fname + offset); + fname2 = f_name(file, fname + offset); if (verbose > 2) rprintf(FINFO, "send_files(%d, %s)\n", i, fname); @@ -331,22 +332,20 @@ void send_files(struct file_list *flist, int f_out, int f_in) if (verbose > 2) { rprintf(FINFO, "send_files mapped %s of size %.0f\n", - safe_fname(fname), (double)st.st_size); + fname, (double)st.st_size); } write_ndx_and_attrs(f_out, i, iflags, fnamecmp_type, xname, xlen); write_sum_head(f_xfer, s); - if (verbose > 2) { - rprintf(FINFO, "calling match_sums %s\n", - safe_fname(fname)); - } + if (verbose > 2) + rprintf(FINFO, "calling match_sums %s\n", fname); if (log_before_transfer) log_item(file, &initial_stats, iflags, NULL); else if (!am_server && verbose && do_progress) - rprintf(FINFO, "%s\n", safe_fname(fname2)); + rprintf(FINFO, "%s\n", fname2); set_compression(fname); @@ -370,10 +369,8 @@ void send_files(struct file_list *flist, int f_out, int f_in) free_sums(s); - if (verbose > 2) { - rprintf(FINFO, "sender finished %s\n", - safe_fname(fname)); - } + if (verbose > 2) + rprintf(FINFO, "sender finished %s\n", fname); /* Flag that we actually sent this entry. */ file->flags |= FLAG_SENT;