Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed Windows bug in Mojo::Asset::File

  • Loading branch information...
commit 078fc07b550344bfe35d63885b4197493ee49736 1 parent a631716
@kraih authored
Showing with 5 additions and 2 deletions.
  1. +1 −0  Changes
  2. +4 −2 lib/Mojo/Asset/File.pm
View
1  Changes
@@ -10,6 +10,7 @@ This file documents the revision history for Perl extension Mojolicious.
- Fixed controller specific render_exception and render_not_found
methods.
- Fixed Mojo::JSON string size limit. (henryykt)
+ - Fixed Windows bug in Mojo::Asset::File. (kimoto)
- Fixed small stack localization bug.
- Fixed typos. (metaperl, cheese)
View
6 lib/Mojo/Asset/File.pm
@@ -134,12 +134,14 @@ sub get_chunk {
sub move_to {
my ($self, $path) = @_;
+ # Windows requires that the handle is closed
+ close $self->handle;
+ delete $self->{handle};
+
# Move
my $src = $self->path;
File::Copy::move($src, $path)
or croak qq/Can't move file "$src" to "$path": $!/;
-
- # Set new path
$self->path($path);
# Don't clean up a moved file
Please sign in to comment.
Something went wrong with that request. Please try again.