Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
check for handle first
  • Loading branch information
kraih committed Jan 27, 2016
1 parent 299b8b5 commit 880f4a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojo/Asset/File.pm
Expand Up @@ -40,7 +40,7 @@ has tmpdir => sub { $ENV{MOJO_TMPDIR} || File::Spec::Functions::tmpdir };
sub DESTROY {
my $self = shift;
return unless $self->cleanup && defined(my $path = $self->path);
close $self->handle;
if (my $handle = $self->handle) { close $handle }
unlink $path if -w $path;
}

Expand Down

0 comments on commit 880f4a6

Please sign in to comment.