]> git.saurik.com Git - apt.git/blobdiff - methods/rred.cc
fix the testcases which were broken by the new space between number and unit
[apt.git] / methods / rred.cc
index f42c7a072cd280ff137dc0705c8143b4b85bc0d4..d51c45c85a990a2c213544350e4825ee963647bc 100644 (file)
@@ -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) {