]> git.vpit.fr Git - perl/modules/rgit.git/blobdiff - lib/App/Rgit/Config.pm
Always canonify the root, the git path and the repo directory
[perl/modules/rgit.git] / lib / App / Rgit / Config.pm
index dd6dff2af7f24ad8b2d7224255eea8878cf90bfd..2ac22b23c149cc268412cabf80d9b52097cf560d 100644 (file)
@@ -3,9 +3,9 @@ package App::Rgit::Config;
 use strict;
 use warnings;
 
-use Carp ();
-use Cwd qw/abs_path/;
-use File::Spec::Functions qw/file_name_is_absolute/;
+use Carp                  ();
+use Cwd                   qw/abs_path/;
+use File::Spec::Functions qw/canonpath/;
 
 use App::Rgit::Repository;
 use App::Rgit::Utils qw/:levels/;
@@ -46,7 +46,7 @@ sub new {
 
  my $root = $args{root};
  return unless defined $root and -d $root;
- $root = abs_path $root unless file_name_is_absolute $root;
+ $root = canonpath abs_path $root;
 
  my $git = $args{git};
  return unless defined $git;
@@ -58,7 +58,7 @@ sub new {
  } else {
   return unless -x $git;
  }
- $git = abs_path $git unless file_name_is_absolute $git;
+ $git = canonpath abs_path $git;
 
  my $conf = 'App::Rgit::Config::Default';
  eval "require $conf; 1" or Carp::confess("Couldn't load $conf: $@");