Skip to content
Permalink
Browse files
Use realpath to get canonical path from path returned by Findbin fixing
  • Loading branch information
Timothy Miles-Board committed May 6, 2014
1 parent 41584c0 commit c03adc8afd0bac12eaffd1221df38ffb4a5c8ed2
Showing with 3 additions and 2 deletions.
  1. +3 −2 perl_lib/EPrints.pm
@@ -65,6 +65,8 @@ A shell script will print the stack trace to the console.
package EPrints;

my $conf;

use Cwd;

BEGIN
{
@@ -81,8 +83,7 @@ BEGIN
# set default global configuration values
if( !defined $conf->{base_path} )
{
my $base_path = $INC{'EPrints.pm'};
$base_path =~ s#[^/]+/\.\.(/|$)##g;
my $base_path = Cwd::realpath( $INC{'EPrints.pm'} );
$base_path =~ s/.perl_lib.EPrints\.pm$//; # ignore / \
$conf->{base_path} = $base_path;
}

0 comments on commit c03adc8

Please sign in to comment.