diff options
Diffstat (limited to 'urpm/download.pm')
-rw-r--r-- | urpm/download.pm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/urpm/download.pm b/urpm/download.pm index dee10c53..18448981 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -837,11 +837,16 @@ sub sync_rel { } } +sub sync_rel_one { + my ($urpm, $medium, $rel_file, %options) = @_; + + my $files = sync_rel($urpm, $medium, [$rel_file], %options) or return; + $files->[0]; +} + sub sync_url { my ($urpm, $url, %options) = @_; - - my $files = sync_rel($urpm, { url => dirname($url) }, [basename($url)], %options) or return; - @$files; + sync_rel_one($urpm, { url => dirname($url) }, basename($url), %options); } sub sync_rel_to { |