X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/1b7137c19b38431c79b41d1dfde73ef76f826836..d9cd1417b07c0d7af7b6aaf57f2d24b17662e62d:/mr 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=~/\/$/;