diff --git a/lib/WebGUI/Config.pm b/lib/WebGUI/Config.pm index 828406e01..403083e3f 100644 --- a/lib/WebGUI/Config.pm +++ b/lib/WebGUI/Config.pm @@ -159,9 +159,7 @@ around new => sub { my $class = shift; my $filename = shift; my $noCache = shift; - if (!File::Spec->file_name_is_absolute($filename)) { - $filename = Cwd::realpath(File::Spec->catfile(WebGUI::Paths->configBase, $filename)); - } + $filename = Cwd::realpath(File::Spec->rel2abs($filename, WebGUI::Paths->configBase)); if (exists $config{$filename}) { return $config{$filename}; } diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm index c98983d60..07e2f5852 100644 --- a/lib/WebGUI/Session.pm +++ b/lib/WebGUI/Session.pm @@ -298,7 +298,7 @@ Creates a new session using the same WebGUI root, config file, and user. sub duplicate { my $self = shift; my $newSession = WebGUI::Session->open( - $self->config->getFilename, + $self->config, undef, undef, $self->getId,