Commit 0826515f authored by Francesc Guasch's avatar Francesc Guasch
Browse files

Fixed if we already have the device the filename is this

parent 07811494
......@@ -1002,7 +1002,7 @@ sub _download($self, $url) {
my $req = HTTP::Request->new( GET => $url);
my $res = $ua->request($req);
die $res->status_line." $url" if !$res->is_success;
confess $res->status_line." $url" if !$res->is_success;
return $self->_cache_store($url,$res->content);
}
......@@ -1058,6 +1058,12 @@ sub _fetch_filename {
}
confess "No file_re" if !$row->{file_re};
if ($row->{device} && !$row->{filename}) {
my ( $file) = $row->{device} =~ m{.*/(.*)};
$row->{filename} = ($row->{rename_file} or $file);
return;
}
my $content = $self->_download($row->{url});
my $file;
my $lines = '';
......
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