summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm.pm')
-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 {