diff options
Diffstat (limited to 'lib/MDV/Distribconf.pm')
-rw-r--r-- | lib/MDV/Distribconf.pm | 16 |
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) |