Bug 4195 - "--list-only" option has an off-by-one error and misses out the last file of the list
"--list-only" option has an off-by-one error and misses out the last file of ...
Status: RESOLVED WORKSFORME
Product: rsync
Classification: Unclassified
Component: core
2.6.8
All All
: P3 enhancement
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-29 11:37 UTC by Thomas Fuegi
Modified: 2006-10-29 11:52 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Fuegi 2006-10-29 11:37:55 UTC
Observed in version 2.6.8 on Linux.

$ ls -l
total 0
-rw------- 1 tom tom 0 Oct 29 17:34 a
-rw------- 1 tom tom 0 Oct 29 17:34 b
-rw------- 1 tom tom 0 Oct 29 17:34 c

$ rsync --list-only *
-rw-------           0 2006/10/29 17:34:49 a
-rw-------           0 2006/10/29 17:34:49 b

The "--dry-run --verbose" combination of options seems to work correctly.
Comment 1 Thomas Fuegi 2006-10-29 11:52:39 UTC
Ah. Not a bug. Last argument is still taken as a destination, so 
"rsync --list-only ." works correctly.

It may useful to check for the mistaken use of "*"... but that's nothing to do with --list-only. The only connection is that --listonly works both with and without a destination argument.