summaryrefslogtreecommitdiffstats
path: root/lib/MDV/Distribconf.pm
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2006-07-24 13:59:34 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2006-07-24 13:59:34 +0000
commitb5e3ae7adddf827cea42c0b8778e1fbcea71b6ae (patch)
tree77ab71f4e02d5167a7634458fbd90f5785b4a279 /lib/MDV/Distribconf.pm
parentf3ac84d2ed26407b8c5f8f7d5a88511cb1ad716e (diff)
downloadperl-MDV-Distribconf-b5e3ae7adddf827cea42c0b8778e1fbcea71b6ae.tar
perl-MDV-Distribconf-b5e3ae7adddf827cea42c0b8778e1fbcea71b6ae.tar.gz
perl-MDV-Distribconf-b5e3ae7adddf827cea42c0b8778e1fbcea71b6ae.tar.bz2
perl-MDV-Distribconf-b5e3ae7adddf827cea42c0b8778e1fbcea71b6ae.tar.xz
perl-MDV-Distribconf-b5e3ae7adddf827cea42c0b8778e1fbcea71b6ae.zip
- fix bug about global path value2.02
Diffstat (limited to 'lib/MDV/Distribconf.pm')
-rw-r--r--lib/MDV/Distribconf.pm16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/MDV/Distribconf.pm b/lib/MDV/Distribconf.pm
index 6f49eeb..70e13a0 100644
--- a/lib/MDV/Distribconf.pm
+++ b/lib/MDV/Distribconf.pm
@@ -2,7 +2,7 @@ package MDV::Distribconf;
# $Id$
-our $VERSION = '2.01';
+our $VERSION = '2.02';
=head1 NAME
@@ -423,13 +423,13 @@ sub getpath {
my $val = $distrib->getvalue($media, $var);
$var =~ /^(?:root|VERSION)$/ and return $val;
my $thispath = $var eq 'path' ? $distrib->{mediadir} : $distrib->{infodir};
- return
- ($distrib->getvalue(undef, 'mediacfg_version') >= 2 ?
- $thispath :
- ($val =~ m!/! ? '' :
- $thispath
- )
- ) . '/' . $val;
+ if ($distrib->getvalue(undef, 'mediacfg_version') >= 2) {
+ return $thispath . ($media ? '/' . $val : '');
+ } else {
+ return ($val =~ m!/! ? "" :
+ ($var eq 'path' ? $distrib->{mediadir} : $distrib->{infodir} )
+ . "/") . $val;
+ }
}
=head2 $distrib->getfullpath($media, $var)