Skip to content

Instantly share code, notes, and snippets.

@perlDreamer
Created June 14, 2010 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save perlDreamer/437912 to your computer and use it in GitHub Desktop.
Save perlDreamer/437912 to your computer and use it in GitHub Desktop.
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