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