]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2003-06-10 01:18:59 by cjwatson]
authorcjwatson <>
Tue, 10 Jun 2003 08:18:59 +0000 (00:18 -0800)
committercjwatson <>
Tue, 10 Jun 2003 08:18:59 +0000 (00:18 -0800)
... but do construct bug component filenames that don't exist yet, since
they're probably new bugs. Sigh. That was a rather crucial corner case.

scripts/errorlib.in

index fe7aceea206c8c4cf15f25e29a3aa9ac6cfb11f9..a5b7a724f29e95142af42e8d40e43ff0cb83e441 100755 (executable)
@@ -1,5 +1,5 @@
 # -*- perl -*-
-# $Id: errorlib.in,v 1.30 2003/06/10 00:59:36 cjwatson Exp $
+# $Id: errorlib.in,v 1.31 2003/06/10 01:18:59 cjwatson Exp $
 
 sub F_SETLK { 6; } sub F_WRLCK{ 1; }
 $flockstruct= 'sslll'; # And there ought to be something for this too.
@@ -55,7 +55,8 @@ sub getbugcomponent {
        # archived bugs but most of the backend scripts don't. For now,
        # anything that is prepared to accept archived bugs should call
        # getbuglocation() directly first.
-       return undef unless $location eq 'db' or $location eq 'db-h';
+       return undef if defined $location and
+                       ($location ne 'db' and $location ne 'db-h');
     }
     my $dir = getlocationpath($location);
     return undef unless $dir;