diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2006-07-20 19:40:37 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2006-07-20 19:40:37 +0000 |
commit | cba83353a4bda1dda61f0ff9a8388fe92d0c270d (patch) | |
tree | bc93c897b2eb17b3598360c7d6d5b9c5f0eacfa1 | |
parent | 043d649f677035805e2600a770074b60412a246a (diff) | |
download | perl-MDV-Distribconf-cba83353a4bda1dda61f0ff9a8388fe92d0c270d.tar perl-MDV-Distribconf-cba83353a4bda1dda61f0ff9a8388fe92d0c270d.tar.gz perl-MDV-Distribconf-cba83353a4bda1dda61f0ff9a8388fe92d0c270d.tar.bz2 perl-MDV-Distribconf-cba83353a4bda1dda61f0ff9a8388fe92d0c270d.tar.xz perl-MDV-Distribconf-cba83353a4bda1dda61f0ff9a8388fe92d0c270d.zip |
- fix getpath()
-rw-r--r-- | lib/MDV/Distribconf.pm | 5 |
1 files 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; } |