From 76e798d0f259d0ca58fba198b2de3a614f908db3 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Fri, 25 Jul 2003 13:57:06 +0000 Subject: fixed bug 3833 (moving downloaded files from partial to rpms). --- urpm.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/urpm.pm b/urpm.pm index 26c091ef..9b61a1b4 100644 --- a/urpm.pm +++ b/urpm.pm @@ -2546,7 +2546,8 @@ sub copy_packages_of_removable_media { URPM::verify_rpm("$urpm->{cachedir}/partial/$filename", nosignatures => 1) !~ /NOT OK/) { #- now we can consider the file to be fine. unlink "$urpm->{cachedir}/rpms/$filename"; - rename "$urpm->{cachedir}/partial/$filename", "$urpm->{cachedir}/rpms/$filename"; + rename("$urpm->{cachedir}/partial/$filename", "$urpm->{cachedir}/rpms/$filename") or + system("mv", "$urpm->{cachedir}/partial/$filename", "$urpm->{cachedir}/rpms/$filename"); -r "$urpm->{cachedir}/rpms/$filename" and $sources->{$i} = "$urpm->{cachedir}/rpms/$filename"; } } else { @@ -2667,7 +2668,8 @@ sub download_packages_of_distant_media { URPM::verify_rpm("$urpm->{cachedir}/partial/$filename", nosignatures => 1) !~ /NOT OK/) { #- it seems the the file has been downloaded correctly and has been checked to be valid. unlink "$urpm->{cachedir}/rpms/$filename"; - rename "$urpm->{cachedir}/partial/$filename", "$urpm->{cachedir}/rpms/$filename"; + rename("$urpm->{cachedir}/partial/$filename", "$urpm->{cachedir}/rpms/$filename") or + system("mv", "$urpm->{cachedir}/partial/$filename", "$urpm->{cachedir}/rpms/$filename"); -r "$urpm->{cachedir}/rpms/$filename" and $sources->{$i} = "$urpm->{cachedir}/rpms/$filename"; } unless ($sources->{$i}) { -- cgit v1.2.1