From: Steinar H. Gunderson Date: Thu, 17 Apr 2008 09:34:49 +0000 (+0200) Subject: Parse the focal length information from the D300 correctly. X-Git-Url: https://git.sesse.net/?p=pr0n;a=commitdiff_plain;h=badd5d08df949436d51abdb8e972a2fc2e341bb6 Parse the focal length information from the D300 correctly. --- diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm index 3b94b59..eb111ce 100644 --- a/perl/Sesse/pr0n/Common.pm +++ b/perl/Sesse/pr0n/Common.pm @@ -641,7 +641,7 @@ sub make_infobox { $info->{'ExposureProgram'} =~ /aperture\b.*\bpriority/i); my @classic_fields = (); - if (defined($info->{'FocalLength'}) && $info->{'FocalLength'} =~ /^(\d+)(?:\.\d+)?(?:mm)?$/) { + if (defined($info->{'FocalLength'}) && $info->{'FocalLength'} =~ /^(\d+)(?:\.\d+)?\s*(?:mm)?$/) { push @classic_fields, [ $1 . "mm", 0 ]; } elsif (defined($info->{'FocalLength'}) && $info->{'FocalLength'} =~ /^(\d+)\/(\d+)$/) { push @classic_fields, [ (sprintf "%.1fmm", ($1/$2)), 0 ];