address cached config objects by full file name

This commit is contained in:
Graham Knop 2009-09-24 18:11:06 -05:00
parent 7d60f7523e
commit 3703fb86d6

View file

@ -170,9 +170,9 @@ sub new {
my $webguiPath = Cwd::realpath(shift);
my $filename = shift;
my $noCache = shift;
my $fullPath = $webguiPath.'/etc/'.$filename;
if (exists $config{$filename}) {
return $config{$filename};
my $fullPath = Cwd::realpath($webguiPath.'/etc/'.$filename);
if (exists $config{$fullPath}) {
return $config{$fullPath};
} else {
my $self = Config::JSON->new($fullPath);
register($self, $class);