Created
June 14, 2010 16:32
-
-
Save perlDreamer/437912 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/WebGUI/Config.pm b/lib/WebGUI/Config.pm | |
index 4982a45..f9710ac 100644 | |
--- a/lib/WebGUI/Config.pm | |
+++ b/lib/WebGUI/Config.pm | |
@@ -16,6 +16,7 @@ package WebGUI::Config; | |
use strict; | |
use Class::InsideOut qw(readonly id register); | |
+use File::Spec; | |
use Cwd (); | |
use base 'Config::JSON'; | |
@@ -170,7 +171,7 @@ sub new { | |
my $webguiPath = Cwd::realpath(shift); | |
my $filename = shift; | |
my $noCache = shift; | |
- my $fullPath = Cwd::realpath($webguiPath.'/etc/'.$filename); | |
+ my $fullPath = Cwd::realpath(File::Spec->rel2abs($filename, $webguiPath.'/etc/')); | |
if ($config{$fullPath}) { | |
return $config{$fullPath}; | |
} else { | |
diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm | |
index b25f3d8..f36366e 100644 | |
--- a/lib/WebGUI/Session.pm | |
+++ b/lib/WebGUI/Session.pm | |
@@ -253,7 +253,7 @@ sub duplicate { | |
my $self = shift; | |
my $newSession = WebGUI::Session->open( | |
$self->config->getWebguiRoot, | |
- $self->config->getFilename, | |
+ $self->config->getFilePath, | |
undef, | |
undef, | |
$self->getId, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment