X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FApp%2FRgit%2FRepository.pm;h=83241a15d941d0c9fb3d13ca1a38b8c2ecc321ea;hb=8fdce8c3a7141c295beda7a77939df531cb8abcc;hp=1b88f5cb91efabf1e8adf8e5d37b2a7f6775999b;hpb=2d737d5df0b318de7cdc2d4c7c225d76f4890038;p=perl%2Fmodules%2Frgit.git diff --git a/lib/App/Rgit/Repository.pm b/lib/App/Rgit/Repository.pm index 1b88f5c..83241a1 100644 --- a/lib/App/Rgit/Repository.pm +++ b/lib/App/Rgit/Repository.pm @@ -4,7 +4,7 @@ use strict; use warnings; use Cwd qw/cwd abs_path/; -use File::Spec::Functions qw/catdir splitdir abs2rel/; +use File::Spec::Functions qw/catdir splitdir abs2rel file_name_is_absolute/; use Object::Tiny qw/fake repo bare name work/; @@ -40,7 +40,7 @@ If the C option is passed, C<$dir> isn't checked to be a valid C repo sub new { my ($class, %args) = &validate; my $dir = $args{dir}; - $dir = abs_path $dir if defined $dir; + $dir = abs_path $dir if defined $dir and not file_name_is_absolute $dir; $dir = cwd unless defined $dir; my ($repo, $bare, $name, $work); if ($args{fake}) {