From c18fd26df23f8cfc8cf0fada3af5d85ef4c33732 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Wed, 28 Apr 2004 08:56:26 +0000 Subject: Fix unlinking of medium list file --- urpm.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index 2a476e4d..afb8229e 100644 --- a/urpm.pm +++ b/urpm.pm @@ -1576,8 +1576,10 @@ this could happen if you mounted manually the directory when creating the medium } } else { #- the flag is no more necessary. - delete $medium->{list} - and unlink "$urpm->{statedir}/$medium->{list}"; + if ($medium->{list}) { + unlink "$urpm->{statedir}/$medium->{list}"; + delete $medium->{list}; + } } } } -- cgit v1.2.1