]> git.vpit.fr Git - perl/modules/rgit.git/blobdiff - lib/App/Rgit/Repository.pm
Only apply abs_path() to paths that are either relative or that contains ..
[perl/modules/rgit.git] / lib / App / Rgit / Repository.pm
index bc847408f45fb1a284fee211fea1a01e573d0199..c340942a820487e1df2650270a1255b423e45b43 100644 (file)
@@ -3,10 +3,12 @@ package App::Rgit::Repository;
 use strict;
 use warnings;
 
-use Cwd        (); # cwd, abs_path
+use Cwd        (); # cwd
 use File::Spec (); # canonpath, catdir, splitdir, abs2rel
 use POSIX      (); # WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG SIGINT SIGQUIT
 
+use App::Rgit::Utils (); # abs_path
+
 my ($WIFEXITED, $WEXITSTATUS, $WIFSIGNALED, $WTERMSIG);
 
 BEGIN {
@@ -26,11 +28,11 @@ App::Rgit::Repository - Class representing a Git repository.
 
 =head1 VERSION
 
-Version 0.06
+Version 0.07
 
 =cut
 
-our $VERSION = '0.06';
+our $VERSION = '0.07';
 
 =head1 DESCRIPTION
 
@@ -55,7 +57,7 @@ sub new {
 
  my $dir = $args{dir};
  if (defined $dir) {
-  $dir = Cwd::abs_path($dir);
+  $dir = App::Rgit::Utils::abs_path($dir);
  } else {
   $dir = Cwd::cwd;
  }
@@ -179,7 +181,7 @@ sub run {
  if ($WIFSIGNALED->($?)) {
   $sig = $WTERMSIG->($?);
   $conf->warn("git died with signal $sig\n");
-  if ($sig == POSIX::SIGINT || $sig == POSIX::SIGQUIT) {
+  if ($sig == POSIX::SIGINT() || $sig == POSIX::SIGQUIT()) {
    $conf->err("Aborting\n");
    exit $sig;
   }