Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
0826515f
Commit
0826515f
authored
Sep 20, 2017
by
Francesc Guasch
Browse files
Fixed if we already have the device the filename is this
parent
07811494
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/Ravada/VM/KVM.pm
View file @
0826515f
...
...
@@ -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 =
''
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment