From a8650a4531259d8ce7a201f8f0f5c49cbb1cbae2 Mon Sep 17 00:00:00 2001 From: Olivier Thauvin Date: Thu, 20 Jul 2006 17:06:05 +0000 Subject: - since version 2, media path are allways relative to mediadir --- lib/MDV/Distribconf.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/MDV') diff --git a/lib/MDV/Distribconf.pm b/lib/MDV/Distribconf.pm index 7c0c4d3..8a3c2fd 100644 --- a/lib/MDV/Distribconf.pm +++ b/lib/MDV/Distribconf.pm @@ -421,7 +421,11 @@ sub getpath { $var ||= ""; # Avoid undef value my $val = $distrib->getvalue($media, $var); $var =~ /^(?:root|VERSION)$/ and return $val; - return ($val =~ m!/! ? "" : ($var eq 'path' ? $distrib->{mediadir} : $distrib->{infodir} ) . "/") . $val; + return + ($distrib->getvalue(undef, 'mediacfg_version') >= 2 ? + $distrib->{mediadir} : + ($val =~ m!/! ? "" : ($var eq 'path' ? $distrib->{mediadir} : $distrib->{infodir} ) . "/")) . + $val; } =head2 $distrib->getfullpath($media, $var) -- cgit v1.2.1