Displaying 1 result from an estimated 1 matches for "preallocate_needs_truncate".
2012 Apr 04
0
bug in rsync write-devices patch
...instead (simple code changes below), which seemed to make things work although it should be coded more cleanly. Thanks.
Ryan
Informal description of changes from receiver.c line 369:
Original code (after applying write-devices patch):
#ifdef HAVE_TRUNCATE
If((inplace
#ifdef PREALLOCATE_NEEDS_TRUNCATE
|| preallocated_len > offset
#endif
) && fd != -1 && !IS_DEVICE(file->mode) && do_ftruncate(fd, offset) < 0) {
Code after change:
#ifdef HAVE_TRUNCATE
{
STRUCT_STAT st;
Do_fstat(fd, &st);
If((i...