Skip Menu |

This queue is for tickets about the Digest-MD5-File CPAN distribution.

Report information
The Basics
Id: 118113
Status: open
Priority: 0/
Queue: Digest-MD5-File

People
Owner: Nobody in particular
Requestors: thilo [...] maggi.nispuk.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Digest fails to open valid file
Date: Wed, 28 Sep 2016 08:54:26 +0200
To: bug-Digest-MD5-File [...] rt.cpan.org
From: thilo jeremias <thilo [...] maggi.nispuk.com>
Hi there,

I have discovered a problem while using the function  file_md5_hex

It fails to open files with trailing spaces in their name on BSD (and probably othere os too)

After debugging I have found, that in line:
53 in Digest/MD5/File.pm

is a

open my $fh,$file or return

This causes perl to use the shell to open. Which in turn strips whitespace

Changing it to:

    52      if(-e $file && !-d $file) {
    53          open (my $fh,"<", $file) or return;
    54          binmode $fh if $BINMODE;
    55          return $fh;
    56      } 
    
Fixes the problem.


Cheers thilo
thanks! I have some more fixes coming upstream soon. I'll be sure to include this one also :)