summaryrefslogtreecommitdiff
path: root/methods/rred.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-08-24 16:34:12 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-08-24 16:34:12 +0200
commit7c122f33c4bf8caec1cf8b250d512b65c3c574ca (patch)
tree81786b34b546c76a27027df3a671bf35ef1aa15e /methods/rred.cc
parent99016ee630714bf906b1f58f6a898226bce0bb03 (diff)
parent662603c40b8b38e487f76e7aceb773c935203cea (diff)
merged from debian-experimental-ma0.8.0
Diffstat (limited to 'methods/rred.cc')
-rw-r--r--methods/rred.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/methods/rred.cc b/methods/rred.cc
index f42c7a072..d51c45c85 100644
--- a/methods/rred.cc
+++ b/methods/rred.cc
@@ -446,7 +446,7 @@ bool RredMethod::Fetch(FetchItem *Itm) /*{{{*/
// the cleanup/closing of the fds)
FileFd From(Path,FileFd::ReadOnly);
FileFd Patch(Path+".ed",FileFd::ReadOnly);
- FileFd To(Itm->DestFile,FileFd::WriteEmpty);
+ FileFd To(Itm->DestFile,FileFd::WriteAtomic);
To.EraseOnFailure();
if (_error->PendingError() == true)
return false;
@@ -458,7 +458,7 @@ bool RredMethod::Fetch(FetchItem *Itm) /*{{{*/
// retry with patchFile
lseek(Patch.Fd(), 0, SEEK_SET);
lseek(From.Fd(), 0, SEEK_SET);
- To.Open(Itm->DestFile,FileFd::WriteEmpty);
+ To.Open(Itm->DestFile,FileFd::WriteAtomic);
if (_error->PendingError() == true)
return false;
if (patchFile(Patch, From, To, &Hash) != ED_OK) {