From dfa1a3d7cbab1e64961b7587276d61e3c9988532 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 10 Jun 2010 23:50:34 -0500 Subject: [PATCH] temporary config file fix --- lib/WebGUI/Config.pm | 4 +--- lib/WebGUI/Session.pm | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) 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,