From f545405cbfefec20d0d8e2ad77bd1e4203c53932 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 16 Oct 2007 01:41:03 -0400 Subject: [PATCH 1/1] * Fix a bug in inheritance of default settings in chained .mrconfig files. --- debian/changelog | 3 ++- mr | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index a6e1e9b..ea49785 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ mr (0.2) UNRELEASED; urgency=low * Fix line number display for config file parse errors. + * Fix a bug in inheritance of default settings in chained .mrconfig files. - -- Joey Hess Sun, 14 Oct 2007 19:03:22 -0400 + -- Joey Hess Tue, 16 Oct 2007 01:40:32 -0400 mr (0.1) unstable; urgency=low diff --git a/mr b/mr index e29e367..adc0546 100755 --- a/mr +++ b/mr @@ -518,7 +518,10 @@ sub loadconfig { #{{{ # copy in defaults from first parent my $parent=$dir; - while ($parent=~s/^(.*)\/[^\/]+\/?$/$1/) { + while ($parent=~s/^(.*\/)[^\/]+\/?$/$1/) { + if ($parent eq '/') { + $parent=""; + } if (exists $config{$parent} && exists $config{$parent}{DEFAULT}) { $config{$dir}{DEFAULT}={ %{$config{$parent}{DEFAULT}} }; -- 2.39.5