From 981919314f9e07ad504644a1885de52752b6b881 Mon Sep 17 00:00:00 2001 From: Guillaume Rousse Date: Sat, 23 May 2009 12:48:00 +0000 Subject: skip PDF files (mdv bug #51128) --- fix_eol | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fix_eol b/fix_eol index 4381cf5..885dcc4 100755 --- a/fix_eol +++ b/fix_eol @@ -31,7 +31,12 @@ sub convert { # check if first line has less than 80 characters and ends with \r\n open(my $in, '<', $_) or die "Unable to open file $_: $!"; my $line = <$in>; - if (defined $line && length($line) <= 80 && $line =~ s/\r\n$/\n/) { + if ( + defined $line && + length($line) <= 80 && + $line !~ /^%PDF/ && + $line =~ s/\r\n$/\n/ + ) { # process all file my $out = File::Temp->new(DIR => '.', UNLINK => 0); print $out $line; -- cgit v1.2.1