summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm')
-rw-r--r--urpm/get_pkgs.pm9
1 files changed, 2 insertions, 7 deletions
diff --git a/urpm/get_pkgs.pm b/urpm/get_pkgs.pm
index 82bccb01..b0545107 100644
--- a/urpm/get_pkgs.pm
+++ b/urpm/get_pkgs.pm
@@ -210,13 +210,8 @@ sub _download_packages_of_distant_media {
my $cachedir = $urpm->{cachedir};
if (! -w "$cachedir/partial") {
- if (my $userdir = urpm::userdir($urpm)) {
- $cachedir = $userdir;
- mkdir "$cachedir/partial";
- mkdir "$cachedir/rpms";
- } else {
- $urpm->{fatal}(1, N("Can not download packages into %s", "$cachedir/partial"));
- }
+ $cachedir = urpm::userdir($urpm)
+ or $urpm->{fatal}(1, N("Can not download packages into %s", "$cachedir/partial"));
}
$urpm->{log}(N("retrieving rpm files from medium \"%s\"...", $blist->{medium}{name}));