Skip to content

Commit

Permalink
Homedir expansion should only happen if ~ is the first character
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmv committed Sep 16, 2013
1 parent 9b4034c commit 1f8d7b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Config/GitLike.pm
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ sub load_file {
}

# Do some canonicalization
$filename =~ s/~/$ENV{'HOME'}/g;
$filename =~ s/^~/$ENV{'HOME'}/g;
$filename = File::Spec->rel2abs($filename);

return $self->data if grep {$_ eq $filename} @{$self->config_files};
Expand Down

0 comments on commit 1f8d7b8

Please sign in to comment.