diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-08-11 09:14:02 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-08-11 09:14:02 +0200 |
commit | 180691bee7484f25d9879a77f577537ae1d98907 (patch) | |
tree | 845c06c2fdf0215902b7b08cf8c91dcdbad6c20d /methods/rred.cc | |
parent | 5368af78fb6c996c8ee24e5cf8f645cf00259ead (diff) | |
parent | 22041bd2864b8d0b401b45dde9eda4003a11fec4 (diff) |
merged from the debian-experimental-ma branch
Diffstat (limited to 'methods/rred.cc')
-rw-r--r-- | methods/rred.cc | 4 |
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) { |