diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-09-23 11:33:56 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-09-23 11:33:56 +0000 |
commit | b743f830a3e7bf919434306aaa37f1337ce81864 (patch) | |
tree | 6ffc92c345e4e4194c836b417a5429a8d107e6fd | |
parent | ce228e5790d3fbd406b834c1387033db82c6796d (diff) | |
download | urpmi-b743f830a3e7bf919434306aaa37f1337ce81864.tar urpmi-b743f830a3e7bf919434306aaa37f1337ce81864.tar.gz urpmi-b743f830a3e7bf919434306aaa37f1337ce81864.tar.bz2 urpmi-b743f830a3e7bf919434306aaa37f1337ce81864.tar.xz urpmi-b743f830a3e7bf919434306aaa37f1337ce81864.zip |
simplify: "$urpm->{cachedir}/partial" is the default "dir" where files are downloaded
-rw-r--r-- | urpm/media.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/urpm/media.pm b/urpm/media.pm index 983975bb..74b86dca 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -1191,22 +1191,21 @@ sub _download_pubkey { sub _download_media_info_file { my ($urpm, $medium, $prefix, $suffix, $options) = @_; - my $download_dir = "$urpm->{cachedir}/partial"; my $name = "$prefix$suffix"; - my $result_file = "$download_dir/$name"; + my $result_file = "$urpm->{cachedir}/partial/$name"; my $found; if (_synthesis_suffix($medium)) { my $local_name = $prefix . _synthesis_suffix($medium) . $suffix; if (urpm::download::sync_rel_to($urpm, $medium, _synthesis_dir_rel($medium) . "/$local_name", $result_file, - dir => $download_dir, %$options)) { + %$options)) { $found = 1; } } if (!$found) { urpm::download::sync_rel($urpm, $medium, [_synthesis_dir_rel($medium) . "/$name"], - dir => $download_dir, %$options) + %$options) or unlink $result_file; } -s $result_file && $result_file; |