summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-08-05 11:48:05 +0000
committerFrancois Pons <fpons@mandriva.com>2003-08-05 11:48:05 +0000
commit91b1512714a88cc406675d3dfeea93d57ec6de60 (patch)
treed54cf645751f807649dd75367a032d1ffda64ef2
parent732698d049eb3278f3fbcf05e4f13cee29ef9a93 (diff)
downloadurpmi-91b1512714a88cc406675d3dfeea93d57ec6de60.tar
urpmi-91b1512714a88cc406675d3dfeea93d57ec6de60.tar.gz
urpmi-91b1512714a88cc406675d3dfeea93d57ec6de60.tar.bz2
urpmi-91b1512714a88cc406675d3dfeea93d57ec6de60.tar.xz
urpmi-91b1512714a88cc406675d3dfeea93d57ec6de60.zip
fixed in sync_curl to go back to cwd from urpmi partial cache.
-rw-r--r--urpm.pm4
1 files changed, 4 insertions, 0 deletions
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 {