]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/Status.pm
* Fix typo in Debbugs::Status
[debbugs.git] / Debbugs / Status.pm
index 312beaca700a511ceee073480b32e5d9e46134f3..ae1d7a11d42c227b2dec016ac40bcfb01e175ef4 100644 (file)
@@ -160,8 +160,10 @@ sub read_bug{
         if not exists $param{bug} and not exists $param{summary};
     my $status;
     my $log;
+    my $location;
     if (not defined $param{summary}) {
-        my ($lref, $location) = @param{qw(bug location)};
+        my $lref;
+        ($lref,$location) = @param{qw(bug location)};
         if (not defined $location) {
              $location = getbuglocation($lref,'summary');
              return undef if not defined $location;
@@ -174,6 +176,7 @@ sub read_bug{
         $status = $param{summary};
         $log = $status;
         $log =~ s/\.summary$/.log/;
+        ($location) = $status =~ m/(db-h|db|archive)/;
     }
     my $status_fh = new IO::File $status, 'r' or
         warn "Unable to open $status for reading: $!" and return undef;
@@ -222,7 +225,7 @@ sub read_bug{
     }
     # Add log last modified time
     $data{log_modified} = (stat($log))[9];
-    $date{location} = $location;
+    $data{location} = $location;
 
     return \%data;
 }