Commit 84959580 authored by Tiago Grego's avatar Tiago Grego
Browse files

Merge branch 'master' into utils_io

parents 971d62df c73cec96
......@@ -341,7 +341,7 @@ sub fetch_file {
my $dest = $args->{'destination_path'} ? $args->{'destination_path'}."$filename" : "/tmp/$filename";
my $response = $ua->mirror($file_url, $dest);
return $dest if ($response->{_msg} eq 'OK');
return $dest if ($response->{_rc} == 200);
if($args->{'nice'}) {
return {'error' => "Cannot download file ($file_url). HTTP request error code ".$response->{_rc}};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment