diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-08-24 16:34:12 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-08-24 16:34:12 +0200 |
commit | 7c122f33c4bf8caec1cf8b250d512b65c3c574ca (patch) | |
tree | 81786b34b546c76a27027df3a671bf35ef1aa15e /methods/bzip2.cc | |
parent | 99016ee630714bf906b1f58f6a898226bce0bb03 (diff) | |
parent | 662603c40b8b38e487f76e7aceb773c935203cea (diff) |
merged from debian-experimental-ma
Diffstat (limited to 'methods/bzip2.cc')
-rw-r--r-- | methods/bzip2.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/methods/bzip2.cc b/methods/bzip2.cc index 5da214bfc..241f21c66 100644 --- a/methods/bzip2.cc +++ b/methods/bzip2.cc @@ -91,7 +91,7 @@ bool Bzip2Method::Fetch(FetchItem *Itm) close(GzOut[1]); FileFd FromGz(GzOut[0]); // For autoclose - FileFd To(Itm->DestFile,FileFd::WriteEmpty); + FileFd To(Itm->DestFile,FileFd::WriteAtomic); To.EraseOnFailure(); if (_error->PendingError() == true) return false; @@ -102,9 +102,8 @@ bool Bzip2Method::Fetch(FetchItem *Itm) while (1) { unsigned char Buffer[4*1024]; - unsigned long Count; - Count = read(GzOut[0],Buffer,sizeof(Buffer)); + ssize_t Count = read(GzOut[0],Buffer,sizeof(Buffer)); if (Count < 0 && errno == EINTR) continue; |