aboutsummaryrefslogtreecommitdiffstats
path: root/log.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-03-10 21:15:37 -0700
committerWayne Davison <wayned@samba.org>2008-03-10 21:39:01 -0700
commit1ed9018e69a0d224ff59184974d9150d1cb8814d (patch)
tree92bec02975a0598b95da3e6e84d5e3cbf20391b1 /log.c
parentff0e15804f3f7f730ac1c7c79bcd0f34ca39fa4c (diff)
downloadandroid_external_rsync-1ed9018e69a0d224ff59184974d9150d1cb8814d.tar.gz
android_external_rsync-1ed9018e69a0d224ff59184974d9150d1cb8814d.tar.bz2
android_external_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.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/log.c b/log.c
index f4808384..b5bd9667 100644
--- a/log.c
+++ b/log.c
@@ -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';