[interchange-cvs] interchange - kwalsh modified lib/Vend/Config.pm

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Thu Jan 31 02:28:01 2002


User:      kwalsh
Date:      2002-01-31 07:27:42 GMT
Modified:  lib/Vend Config.pm
Log:
Tag code files with an unknown file extension will now be silently
ignored instead of being assumed to be UserTag files.

This allows for backup/old files to be kept in the same directory,
as is normally expected.

Revision  Changes    Path
2.29      +5 -5      interchange/lib/Vend/Config.pm


rev 2.29, prev_rev 2.28
Index: Config.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Config.pm,v
retrieving revision 2.28
retrieving revision 2.29
diff -u -r2.28 -r2.29
--- Config.pm	31 Jan 2002 05:38:12 -0000	2.28
+++ Config.pm	31 Jan 2002 07:27:42 -0000	2.29
@@ -1,6 +1,6 @@
 # Vend::Config - Configure Interchange
 #
-# $Id: Config.pm,v 2.28 2002/01/31 05:38:12 kwalsh Exp $
+# $Id: Config.pm,v 2.29 2002/01/31 07:27:42 kwalsh Exp $
 #
 # Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -44,7 +44,7 @@
 use Vend::Parse;
 use Vend::Util;
 
-$VERSION = substr(q$Revision: 2.28 $, 10);
+$VERSION = substr(q$Revision: 2.29 $, 10);
 
 my %CDname;
 
@@ -987,9 +987,9 @@
 	for(@files) {
 		next if m{^\.};
 		next if m{/\.};
-		next unless m{\.(\w+)$};
-		my $ext = $1;
-		$CodeDest = $extmap{lc $ext} || 'UserTag';
+		next unless m{/[^.]+\.(\w+)$};
+
+		$CodeDest = $extmap{lc $1} or next;
 		open SYSTAG, "< $_"
 			or config_error("read system tag file %s: %s", $_, $!);
 		while(<SYSTAG>) {