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/;
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}) {