From 157c39c7997ed7d9dd36c369e3bbd05d24a4774d Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Wed, 20 Oct 2004 12:05:33 +0000 Subject: Use File::Find (which is in perl-base) --- urpm.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index 0c55331a..2920ae73 100644 --- a/urpm.pm +++ b/urpm.pm @@ -4,6 +4,7 @@ package urpm; use strict; use MDK::Common; +use File::Find (); use urpm::msg; use urpm::download; use urpm::util; @@ -1246,7 +1247,9 @@ this could happen if you mounted manually the directory when creating the medium #- is a symlink to a directory. #- make sure rpm filename format is correct and is not a source rpm #- which are not well managed by urpmi. - @files = split "\n", `find '$dir/' -name "*.rpm" -print`; + File::Find::find { wanted => sub { + -f && /\.rpm$/ && push @files, "$File::Find::dir/$_" + } }, $dir; #- check files contains something good! if (@files > 0) { -- cgit v1.2.1