Skip to content

Commit

Permalink
copy path parts before modifying them
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 14, 2017
1 parent fea3ef0 commit c9a500b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

7.48 2017-10-12
7.48 2017-10-14

7.47 2017-10-05
- Added multipart content generator to Mojo::UserAgent::Transactor.
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojo/File.pm
Expand Up @@ -77,12 +77,12 @@ sub move_to {
}

sub new {
my $class = shift;
my ($class, @p) = @_;

# File systems require bytes, make sure we don't accidentally upgrade
utf8::downgrade $_, 1 for @_;
utf8::downgrade $_, 1 for @p;

my $value = @_ == 1 ? $_[0] : @_ > 1 ? catfile @_ : canonpath getcwd;
my $value = @p == 1 ? $p[0] : @p > 1 ? catfile @p : canonpath getcwd;
return bless \$value, ref $class || $class;
}

Expand Down

0 comments on commit c9a500b

Please sign in to comment.