diff options
author | Wayne Davison <wayned@samba.org> | 2008-03-10 21:15:37 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2008-03-10 21:39:01 -0700 |
commit | 1ed9018e69a0d224ff59184974d9150d1cb8814d (patch) | |
tree | 92bec02975a0598b95da3e6e84d5e3cbf20391b1 /log.c | |
parent | ff0e15804f3f7f730ac1c7c79bcd0f34ca39fa4c (diff) | |
download | rsync-1ed9018e69a0d224ff59184974d9150d1cb8814d.tar.gz rsync-1ed9018e69a0d224ff59184974d9150d1cb8814d.tar.bz2 rsync-1ed9018e69a0d224ff59184974d9150d1cb8814d.zip |
Fixed some itemized logging failures:
- If a symlink/device/special-file changes its value without any
attribute changes, the itemized event no longer gets dropped.
- We put a 'c' into the checksum/change field now to indicate when
a symlink/device/special-file changes its value without changing
its type. This lets us properly interpret the --copy-links output
to know which items are getting copied without changes and which
are getting created with new content.
- Fixed the 'T' itemized output for a symlink when rsync tries to
set the right time but fails due to lack of OS/disk support.
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 24 |
1 files changed, 15 insertions, 9 deletions
@@ -632,15 +632,21 @@ static void log_formatted(enum logcode code, const char *format, const char *op, ? iflags & ITEM_XNAME_FOLLOWS ? 'h' : 'c' : !(iflags & ITEM_TRANSFER) ? '.' : !local_server && *op == 's' ? '<' : '>'; - c[1] = S_ISDIR(file->mode) ? 'd' - : IS_SPECIAL(file->mode) ? 'S' - : IS_DEVICE(file->mode) ? 'D' - : S_ISLNK(file->mode) ? 'L' : 'f'; - c[2] = !(iflags & ITEM_REPORT_CHECKSUM) ? '.' : 'c'; - c[3] = !(iflags & ITEM_REPORT_SIZE) ? '.' : 's'; - c[4] = !(iflags & ITEM_REPORT_TIME) ? '.' - : !preserve_times || (!receiver_symlink_times && S_ISLNK(file->mode)) - ? 'T' : 't'; + if (S_ISLNK(file->mode)) { + c[1] = 'L'; + c[3] = '.'; + c[4] = !(iflags & ITEM_REPORT_TIME) ? '.' + : !preserve_times || !receiver_symlink_times + || (iflags & ITEM_REPORT_TIMEFAIL) ? 'T' : 't'; + } else { + c[1] = S_ISDIR(file->mode) ? 'd' + : IS_SPECIAL(file->mode) ? 'S' + : IS_DEVICE(file->mode) ? 'D' : 'f'; + c[3] = !(iflags & ITEM_REPORT_SIZE) ? '.' : 's'; + c[4] = !(iflags & ITEM_REPORT_TIME) ? '.' + : !preserve_times ? 'T' : 't'; + } + c[2] = !(iflags & ITEM_REPORT_CHANGE) ? '.' : 'c'; c[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p'; c[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o'; c[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g'; |