summaryrefslogtreecommitdiff
path: root/dselect
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-12-01 22:11:29 +0100
committerGuillem Jover <guillem@debian.org>2015-01-28 20:50:32 +0100
commit5e59d94a17051b1185c591a1fc3eed00e3b01070 (patch)
treebbe275c3e62099381268359ae96a68531d403de5 /dselect
parent200e5fd6572ca67d2d26c2da0c53ded782626225 (diff)
downloaddpkg-5e59d94a17051b1185c591a1fc3eed00e3b01070.tar.gz
perl: Switch from legacy File::Path functions to new ones
Use make_path() instead of mkpath(), and remove_tree() instead of rmtree().
Diffstat (limited to 'dselect')
-rwxr-xr-xdselect/methods/ftp/install.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/dselect/methods/ftp/install.pl b/dselect/methods/ftp/install.pl
index c217fa95d..154239b12 100755
--- a/dselect/methods/ftp/install.pl
+++ b/dselect/methods/ftp/install.pl
@@ -21,7 +21,7 @@ use warnings;
eval q{
use Net::FTP;
- use File::Path;
+ use File::Path qw(make_path remove_tree);
use File::Basename;
use File::Find;
use Data::Dumper;
@@ -56,7 +56,7 @@ my $methdir = "$vardir/methods/ftp";
read_config("$methdir/vars");
chdir "$methdir";
-mkpath(["$methdir/$CONFIG{dldir}"], 0, 0755);
+make_path("$methdir/$CONFIG{dldir}", { mode => 0755 });
#Read md5sums already calculated
@@ -230,7 +230,7 @@ foreach my $pkg (keys(%pkgs)) {
}
$dir = dirname($fn);
if(! -d "$dldir/$dir") {
- mkpath(["$dldir/$dir"], 0, 0755);
+ make_path("$dldir/$dir", { mode => 0755 });
}
@info = @{$pkgfiles{$fn}};
$csize = int($info[1]/1024)+1;
@@ -615,7 +615,7 @@ if (yesno('y', "\nDo you wish to delete the installed package (.deb) files?")) {
# remove whole ./debian directory if user wants to
if (yesno('n', "\nDo you want to remove $dldir directory?")) {
- rmtree("$dldir");
+ remove_tree($dldir);
}
#Store useful md5sums