X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/d9b82cdd522cbd05dbffa5b72037415407bc46f6..f545405cbfefec20d0d8e2ad77bd1e4203c53932:/mr 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}} };