Parse the focal length information from the D300 correctly.
authorSteinar H. Gunderson <sesse@debian.org>
Thu, 17 Apr 2008 09:34:49 +0000 (11:34 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Thu, 17 Apr 2008 09:34:49 +0000 (11:34 +0200)
perl/Sesse/pr0n/Common.pm

index 3b94b592a6a543b6eb70c0670b4015711bc0199e..eb111ceb9dc513c50987ba7e9683c66706592217 100644 (file)
@@ -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 ];