According to Ondřej Vašík on 3/2/2010 8:03 AM: > Hello, > as reported in rhbz#569550 , md5sum (and all others sum utilities) fails > to work with DOS md5 files. > > This issue was previously reported on this list as > http://lists.gnu.org/archive/html/bug-coreutils/2004-11/msg00037.html , > http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00073.html , > but I haven't found patch solving this issue in those reports.
Correct - it's been on my TODO list for years, but very low priority. > > Attached patch should solve it and I don't see any negative side effects from > it. Your patch breaks if a file name actually ended in a carriage return. A better patch would be to teach the *sum utilities to output carriage return in filenames as \r by default but keep a flag for generating output compatible with older *sum versions; parse both \r and literal carriage return on input; and, if no \r occurs in input but a carriage return is present, to try two filenames (one with trailing carriage return, one without) before giving up. But, given the rarity of file names that actually end in a literal carriage return, your patch is certainly a step in the right direction. I'll let others decide whether to apply it, but you have my +1. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature