Commit Graph

469 Commits

Author SHA1 Message Date
Wayne Davison
929002a2d5 Avoid infinite loop if the file's length is negative.
Fixes bug 4664.
2010-08-21 13:48:01 -07:00
Wayne Davison
b3e41255a6 I like braces when multiple lines are indented. 2010-06-26 11:43:09 -07:00
Wayne Davison
54504b8e4f Output list-only sizes using any human-readable setting. 2010-06-26 10:00:29 -07:00
Wayne Davison
e60c8b59fe Fix daemon-filter crash issue (bug 7489). 2010-06-04 23:09:20 -07:00
Matt McCutchen
7a3ce973c3 In "ignoring unsafe symlink" messages, show only the file-list path.
Rsync was showing the full destination path, which was confusing because
nothing is created at that path and was especially bogus in combination
with the source name of a solo file.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506830
2010-04-24 09:51:54 -07:00
Wayne Davison
05c36015f7 More --timeout improvements, especially for the receiving side:
- The receiver now sends keep-alive messages to the generator
  when it is actively doing work and hasn't sent anything
  recently.  This ensures that the generator won't timeout
  if the receiver is working hard.
- The perform_io() code has improved keep-alive participation.
- Allow the sender to send some keep-alive messages, which
  ensures that if it is in a lull, it can probe the socket.
2010-01-02 10:58:39 -08:00
Wayne Davison
92d021488e Improve --timeout method to take into account all I/O that is going on.
The receiving side also switches timeout handling from the receiver to
the generator, which obviates the need for the sender to send any
keep-alive messages at all (for protocol 31 and beyond).  Given this
setup, all keep-alive messages are now sent as empty MSG_DATA messages,
with MSG_NOOP messages only being understood and (when necessary) acted
upon to forward a keep-alive event to an older receiver.  This is both
safer and more compatible with older versions.
2009-12-19 11:00:36 -08:00
Wayne Davison
24079e988f Don't (wrongly) retouch dir permissions with --fake-super.
(Patch from Matt.)
2009-11-28 21:46:42 -08:00
Wayne Davison
23a0d1e200 Get rid of some unneeded externs. 2009-10-27 12:38:30 -07:00
Wayne Davison
4dde3347fb Fix %b and %c so that they count per-transfer bytes again. 2009-10-25 22:27:01 -07:00
Wayne Davison
ee1c00fea8 Pass "new_mode" to set_acl() and change its return values. 2009-09-12 09:27:07 -07:00
Wayne Davison
1a2e41af94 Add support for transferring & setting nsec time values. 2009-09-07 14:11:58 -07:00
Wayne Davison
accc091fe9 Always use lutimes() if it is available. 2009-09-07 13:45:33 -07:00
Wayne Davison
6e310d38fc Have --fake-super turn a symlink into a file when
NO_SYMLINK_XATTRS is defined.
2009-09-02 09:06:29 -07:00
Wayne Davison
8e15bd87dd Better compiling if SUPPORT_LINKS is not defined. 2009-09-02 08:53:40 -07:00
Wayne Davison
c55fb5e1d6 Create non-transferred files in a more atomic manner:
If a symlink, device, special-file, or hard-linked file is replacing
an existing non-directory, the new file is created using a temporary
filename and then renamed into place.  Also changed the handling of
a cluster of hard-linked symlinks/devices/special-files to always
ensure the first item in the cluster is correct, since it doesn't
really save any significant work to try to find an existing correct
item later in the cluster to link with.
2009-08-29 16:18:57 -07:00
Wayne Davison
ce827c3e50 Have the sender use dead time to pad out the file list. 2009-08-22 08:15:26 -07:00
Wayne Davison
7b6c5c7794 Use typedefs for the filter structures. 2009-05-23 09:07:43 -07:00
Wayne Davison
a8e6e14869 Change sending/receiving/storing of the rdev value for special files.
Since the value is not needed, protocol 31 no longer sends it, while
older protocols are optimized so the sender just sends a valid rdev
value as efficiently as possible.  The receiver no longer caches an
rdev value for special files, and the generator will always pass a 0
rdev value to do_mknod() for special files. Fixes bug #6280.
2009-04-26 07:43:32 -07:00
Wayne Davison
d510e82fc6 Fixed the use of --xattrs with --only-write-batch. 2009-04-12 12:51:20 -07:00
Wayne Davison
3696674bc6 More backup improvements:
- Changed get_backup_name() to verify the backup path, and make any
  missing directories.  This avoids accidental use of a symlink as a dir
  in a backup path, and gets rid of any other non-dirs that are in the
  way.  It also avoids the need for various operations to retry after
  calling make_bak_dir(), simplifying several pices of code.
- Changed create_directory_path() to make_path(), giving it flags that
  lets the caller decide if it should skip a leading slash or drop the
  trailing filename.
- Mention when we create the backup directory, so the user is not caught
  unaware when rsync uses a directory they didn't expect.
- Got rid of some dir-moving backup code that is not used.
- Added a little more backup-debug output.
2009-04-11 11:51:07 -07:00
Wayne Davison
42d8ec616d My version of Matt's improvements related to missing source args:
- Implement --ignore-missing-args.
- In the absence of --*-missing-args, a missing source arg is an
  FERROR_XFER, but doesn't need to be an IOERR_GENERAL.
- Revise the man page.
2009-03-13 09:37:31 -07:00
Wayne Davison
7781241889 Make missing args governed by protect filters, not hide. 2009-03-13 08:49:53 -07:00
Wayne Davison
b5473dd4a9 Made --list-only output missing args as a "*missing" line. 2009-03-06 22:42:13 -08:00
Wayne Davison
ce66f41791 Added the --delete-missing-args option to delete specified
files on the receiver that don't exist on the sender.
2009-02-28 09:25:26 -08:00
Wayne Davison
bc40a30503 Fixed the delete statistics with --delete-delay and --delete-after. 2009-01-17 14:46:42 -08:00
Wayne Davison
4079d6a684 Fixed a hang in the inc_recurse batch-reading code. 2009-01-17 13:59:08 -08:00
Wayne Davison
b3bf9b9df9 Update the copyright year. 2009-01-03 10:57:14 -08:00
Wayne Davison
974e18191c Make delete_item() public, moving it into delete.c. 2009-01-03 10:52:50 -08:00
Wayne Davison
09ca0d15d3 Added init_stat_x() to avoid duplication of acl/xattr init code. 2009-01-03 08:53:59 -08:00
Matt McCutchen
d4d56eed8a Add flist_find_ignore_dirness() and change delete_in_dir() to use it.
This fixes an issue with -K noticed by eric casteleijn, avoids some
inconsistent itemizing when a file/dir is replaced by a dir/file,
and removes a now-obsolete chunk of code from make_file().
2008-11-10 07:05:21 -08:00
Wayne Davison
e366e5303f Enhanced the --stats output:
- Mention how many files were created (protocol >= 29).
- Mention how many files were deleted (new in protocol 31).
- Follow the file-count, created-count, and deleted-count
  with a break-out list of each count by type.
2008-09-26 22:14:01 -07:00
Wayne Davison
af2dea6033 Fixed skipping of unneeded updates in a batch file when
incremental recursion is active.  Added test.
2008-09-23 19:31:14 -07:00
Wayne Davison
5dd14f0c33 Split up the ifuncs.h file into 3 .h files. 2008-09-01 19:11:36 -07:00
Wayne Davison
adc2476fa2 Output numbers in 3-digit groups by default (e.g. 1,234,567).
Also improved the human-readable output functions, including
adding the ability to output negative numbers.
2008-09-01 13:27:11 -07:00
Wayne Davison
8b3e60523a Improved the fix that ensures that the generator gets notified about an
I/O error for the incremental directory that generated the error.  The
PROTOCOL_VERSION was bumped to 31 to implement this.
2008-08-31 09:43:39 -07:00
Wayne Davison
79daa59618 Make the !flist_eof assumption explicit before the check_for_io_err
code calls wait_for_receiver().
2008-08-24 12:54:49 -07:00
Wayne Davison
e982d59146 Changed flist_for_ndx() to optionally die with an error
if the index isn't found.
2008-08-14 07:40:56 -07:00
Wayne Davison
f303b749f2 Added logic to the receiving side to ensure that the --delete-during
code will not delete in a directory prior to receiving an I/O error
for that directory (or not receiving it, as the case may be).
2008-08-02 09:14:36 -07:00
Wayne Davison
342bfb5e23 Output an FERROR* for a general io_error, and an FWARNING for other
io_error flags.
2008-07-31 07:59:45 -07:00
Wayne Davison
b791d6802b Include the array-size in array externs so that IBM's code-checker
can do more checking for us.
2008-07-20 22:41:29 -07:00
Wayne Davison
5a18b34de3 Changed the chksum debug flag to deltasum. 2008-07-20 20:02:09 -07:00
Wayne Davison
7f0db4fd8e Use big_num() in a few more places. 2008-07-17 17:01:10 -07:00
Wayne Davison
6d56efa6ea Changed human_num() to big_num() with an extra arg so that it can
be used in place of all %.0f output idioms.
2008-07-17 07:37:31 -07:00
Wayne Davison
951e826b75 Added the --info=FLAGS an --debug=FLAGS options, which allows
fine-grained output control (in addition to the coarse -v).
2008-07-13 20:51:08 -07:00
Wayne Davison
d8d1389348 Fixed the timeout/flush loop-check logic to work properly with
incremental recursion.
2008-07-13 17:29:47 -07:00
Wayne Davison
a24d64bfaa Fixed a problem with a file descriptor being left open in the
generator when handling an empty file.
2008-06-26 08:14:11 -07:00
Wayne Davison
8bd77e7098 Fixed the sending of large files with older rsync versions by
handling the old block-size limit for protocols < 29.
2008-06-23 09:17:55 -07:00
Wayne Davison
67347196b1 Fix the problem with setting xattrs on a directory that has an
identical match found in a --link-dest/--copy-dest hierarchy.
2008-06-12 23:08:43 -07:00
Wayne Davison
ca7d17e41d Handle a solo_file of a directory for --delete-during. 2008-06-09 07:42:03 -07:00