X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/1b7137c19b38431c79b41d1dfde73ef76f826836..46047e7a80111656bba297b17fa55353e3d83509:/mr?ds=sidebyside diff --git a/mr b/mr index 4fc7971..3148a3f 100755 --- a/mr +++ b/mr @@ -1028,8 +1028,11 @@ sub config { #{{{ sub register { #{{{ if ($config_overridden) { - ($directory)=$ENV{MR_CONFIG}=~/^(.*\/)[^\/]+$/; - } else { + # Find the directory that the specified config file is + # located in. + ($directory)=abs_path($ENV{MR_CONFIG})=~/^(.*\/)[^\/]+$/; + } + else { # Find the closest known mrconfig file to the current # directory. $directory.="/" unless $directory=~/\/$/;