Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tweaked s### and m## to avoid vim highlighting issues.
[rsync/rsync.git]
/
receiver.c
diff --git
a/receiver.c
b/receiver.c
index
9164247
..
0135e42
100644
(file)
--- a/
receiver.c
+++ b/
receiver.c
@@
-3,7
+3,7
@@
*
* Copyright (C) 1996-2000 Andrew Tridgell
* Copyright (C) 1996 Paul Mackerras
*
* Copyright (C) 1996-2000 Andrew Tridgell
* Copyright (C) 1996 Paul Mackerras
- * Copyright (C) 2003-200
8
Wayne Davison
+ * Copyright (C) 2003-200
9
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
*
* 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
@@
-285,8
+285,11
@@
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
goto report_write_error;
#ifdef HAVE_FTRUNCATE
goto report_write_error;
#ifdef HAVE_FTRUNCATE
- if (inplace && fd != -1)
- ftruncate(fd, offset);
+ if (inplace && fd != -1
+ && ftruncate(fd, offset) < 0) {
+ rsyserr(FERROR_XFER, errno, "ftruncate failed on %s",
+ full_fname(fname));
+ }
#endif
if (INFO_GTE(PROGRESS, 1))
#endif
if (INFO_GTE(PROGRESS, 1))
@@
-328,7
+331,7
@@
static void handle_delayed_updates(char *local_name)
struct file_struct *file = cur_flist->files[ndx];
fname = local_name ? local_name : f_name(file, NULL);
if ((partialptr = partial_dir_fname(fname)) != NULL) {
struct file_struct *file = cur_flist->files[ndx];
fname = local_name ? local_name : f_name(file, NULL);
if ((partialptr = partial_dir_fname(fname)) != NULL) {
- if (make_backups > 0 && !make_backup(fname))
+ if (make_backups > 0 && !make_backup(fname
, False
))
continue;
if (DEBUG_GTE(RECV, 1)) {
rprintf(FINFO, "renaming %s to %s\n",
continue;
if (DEBUG_GTE(RECV, 1)) {
rprintf(FINFO, "renaming %s to %s\n",