summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mgaapplet_urpm.pm6
1 files changed, 1 insertions, 5 deletions
diff --git a/mgaapplet_urpm.pm b/mgaapplet_urpm.pm
index 304f3352..0212e395 100644
--- a/mgaapplet_urpm.pm
+++ b/mgaapplet_urpm.pm
@@ -5,15 +5,11 @@ package mgaapplet_urpm;
use MDK::Common;
use urpm::download;
-sub userdir_prefix {
- my ($_urpm) = @_;
- '/tmp/.urpmi-';
-}
sub userdir {
my ($urpm) = @_;
$< or return;
- my $dir = ($urpm->{urpmi_root} || '') . userdir_prefix($urpm) . $<;
+ my $dir = ($urpm->{urpmi_root} || '') . urpm::userdir_prefix($urpm) . $<;
mkdir $dir, 0755; # try to create it
-d $dir && ! -l $dir or $urpm->{fatal}(1, sprintf("fail to create directory %s", $dir));