From badd5d08df949436d51abdb8e972a2fc2e341bb6 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 17 Apr 2008 11:34:49 +0200 Subject: [PATCH] Parse the focal length information from the D300 correctly. --- perl/Sesse/pr0n/Common.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ]; -- 2.39.2