summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-04 15:03:38 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-04 15:03:38 +0000
commit01dc335b50ddf12cdaf33a1dfe77088a6a660efb (patch)
treec854aab9d6b224702af48adcfc1d5fb071d8385a
parent8f410f4fa0080b8c189a075dbadf08a6af72b453 (diff)
downloadurpmi-01dc335b50ddf12cdaf33a1dfe77088a6a660efb.tar
urpmi-01dc335b50ddf12cdaf33a1dfe77088a6a660efb.tar.gz
urpmi-01dc335b50ddf12cdaf33a1dfe77088a6a660efb.tar.bz2
urpmi-01dc335b50ddf12cdaf33a1dfe77088a6a660efb.tar.xz
urpmi-01dc335b50ddf12cdaf33a1dfe77088a6a660efb.zip
fix regression introduced in previous commit
(it was working in my cases since urpm::ensure_valid_cachedir() was called beforehand)
-rw-r--r--urpm/download.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index e9a37531..221f5339 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -810,10 +810,11 @@ sub sync {
sub get_content {
my ($urpm, $url) = @_;
- my $file = urpm::valid_cachedir($urpm) . '/partial/' . basename($url);
+ my $download_dir = urpm::valid_cachedir($urpm) . '/partial/';
+ my $file = $download_dir . basename($url);
unlink $file; # prevent "partial file" errors
- sync_url($urpm, $url, quiet => 1) or return;
+ sync_url($urpm, $url, dir => $download_dir, quiet => 1) or return;
my @l = cat_($file);
unlink $file;