Bug 5380 - %M in log format converts following spaces into '-'
%M in log format converts following spaces into '-'
Status: CLOSED FIXED
Product: rsync
Classification: Unclassified
Component: core
3.0.3
x86 Linux
: P3 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-08 18:51 UTC by wolfgang.mayer
Modified: 2008-07-28 20:08 UTC (History)
0 users

See Also:


Attachments
proposed fix (the argument to strchr in log.c seems to be incorrect) (416 bytes, patch)
2008-04-08 19:14 UTC, wolfgang.mayer
no flags Details
make the previous patch more efficient (don't rescan the already processed string) (416 bytes, patch)
2008-04-08 19:31 UTC, wolfgang.mayer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description wolfgang.mayer 2008-04-08 18:51:02 UTC
Consider 

rsync -an --out-format="%M %f" /home /tmp

In the output, all spaces following %M are converted to '-'. (When using tabs to delimit the format specifiers, the problem does not seem to occur.)
The same happens when using custom log formats.

This is on Linux [Fedora 7, 2.6.21-1.3228.fc7, x86_64, glibc 2.6].
Comment 1 wolfgang.mayer 2008-04-08 19:14:32 UTC
Created attachment 3252 [details]
proposed fix (the argument to strchr in log.c seems to be incorrect)
Comment 2 wolfgang.mayer 2008-04-08 19:31:30 UTC
Created attachment 3253 [details]
make the previous patch more efficient (don't rescan the already processed string)
Comment 3 Wayne Davison 2008-04-15 10:35:11 UTC
Thanks for both the report and the patch!

I have applied this fix to the git repository.