From cba83353a4bda1dda61f0ff9a8388fe92d0c270d Mon Sep 17 00:00:00 2001 From: Olivier Thauvin Date: Thu, 20 Jul 2006 19:40:37 +0000 Subject: - fix getpath() --- lib/MDV/Distribconf.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/MDV/Distribconf.pm b/lib/MDV/Distribconf.pm index 48818b0..6f49eeb 100644 --- a/lib/MDV/Distribconf.pm +++ b/lib/MDV/Distribconf.pm @@ -422,11 +422,12 @@ sub getpath { $var ||= ""; # Avoid undef value 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 ? - $distrib->{mediadir} : + $thispath : ($val =~ m!/! ? '' : - ($var eq 'path' ? $distrib->{mediadir} : $distrib->{infodir}) + $thispath ) ) . '/' . $val; } -- cgit v1.2.1