Skip to content

Commit fb8c4c0

Browse files
committed
Add binmode to filehandles in dos2unix()
Should resolve " dos2unix() does not work on Windows #258 "
1 parent cd1a8b7 commit fb8c4c0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/ExtUtils/Command.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ sub dos2unix {
347347
open ORIG, $_ or do { warn "dos2unix can't open $_: $!"; return };
348348
open TEMP, ">$temp" or
349349
do { warn "dos2unix can't create .dos2unix_tmp: $!"; return };
350+
binmode ORIG; binmode TEMP;
350351
while (my $line = <ORIG>) {
351352
$line =~ s/\015\012/\012/g;
352353
print TEMP $line;

0 commit comments

Comments
 (0)