Moved the verbose message about renaming the finished file down into

finish_transfer() so that it only gets output when we're actually going
to rename the file.
This commit is contained in:
Wayne Davison
2004-07-02 18:13:53 +00:00
parent 8186ae6bc0
commit da38e779ea
2 changed files with 2 additions and 3 deletions

View File

@@ -474,9 +474,6 @@ int recv_files(int f_in,struct file_list *flist,char *local_name)
exit_cleanup(RERR_FILEIO);
}
if (verbose > 2)
rprintf(FINFO,"renaming %s to %s\n",fnametmp,fname);
if (recv_ok || keep_partial)
finish_transfer(fname, fnametmp, file, recv_ok);
else

View File

@@ -240,6 +240,8 @@ void finish_transfer(char *fname, char *fnametmp, struct file_struct *file,
return;
/* move tmp file over real file */
if (verbose > 2)
rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS);
if (ret < 0) {
rsyserr(FERROR, errno, "%s %s -> \"%s\"",