summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index 68165464..3b68e791 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2404,7 +2404,8 @@ sub get_source_packages {
my $dh = $urpm->opendir_safe("$urpm->{cachedir}/rpms");
if ($dh) {
while (defined($_ = readdir $dh)) {
- if (my ($filename) = m|^([^/]*\.rpm)$|) {
+ if (/\.rpm$/) {
+ my $filename = $_;
my $filepath = "$urpm->{cachedir}/rpms/$filename";
if (!$options{clean_all} && -s $filepath) {
if (keys(%{$file2fullnames{$filename} || {}}) > 1) {