From 91b1512714a88cc406675d3dfeea93d57ec6de60 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Tue, 5 Aug 2003 11:48:05 +0000 Subject: fixed in sync_curl to go back to cwd from urpmi partial cache. --- urpm.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index 40fd8980..97b4f0e0 100644 --- a/urpm.pm +++ b/urpm.pm @@ -209,6 +209,7 @@ sub sync_curl { -x "/usr/bin/curl" or die N("curl is missing\n"); local *CURL; my $options = shift @_; + my $cwd = `pwd`; chomp $cwd; chdir(ref($options) ? $options->{dir} : $options); my (@ftp_files, @other_files); foreach (@_) { @@ -292,7 +293,10 @@ sub sync_curl { $buf = ''; } } + chdir $cwd; close CURL or die N("curl failed: exited with %d or signal %d\n", $? >> 8, $? & 127); + } else { + chdir $cwd; } } sub sync_rsync { -- cgit v1.2.1