diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2006-07-20 17:06:05 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2006-07-20 17:06:05 +0000 |
commit | a8650a4531259d8ce7a201f8f0f5c49cbb1cbae2 (patch) | |
tree | eda42b8fd7ec4f51af7d3c8d2213126e886921d7 /lib/MDV | |
parent | 88216bcd4276aac93f4401974203087a00bcf8dc (diff) | |
download | perl-MDV-Distribconf-a8650a4531259d8ce7a201f8f0f5c49cbb1cbae2.tar perl-MDV-Distribconf-a8650a4531259d8ce7a201f8f0f5c49cbb1cbae2.tar.gz perl-MDV-Distribconf-a8650a4531259d8ce7a201f8f0f5c49cbb1cbae2.tar.bz2 perl-MDV-Distribconf-a8650a4531259d8ce7a201f8f0f5c49cbb1cbae2.tar.xz perl-MDV-Distribconf-a8650a4531259d8ce7a201f8f0f5c49cbb1cbae2.zip |
- since version 2, media path are allways relative to mediadir
Diffstat (limited to 'lib/MDV')
-rw-r--r-- | lib/MDV/Distribconf.pm | 6 |
1 files changed, 5 insertions, 1 deletions
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) |