reorder includes: add <config.h> if needed and include it at first
[ntk/apt.git] / methods / copy.cc
index 027b59f..94467e0 100644 (file)
@@ -9,6 +9,8 @@
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
+#include <config.h>
+
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/error.h>
@@ -52,7 +54,7 @@ bool CopyMethod::Fetch(FetchItem *Itm)
    
    // See if the file exists
    FileFd From(File,FileFd::ReadOnly);
-   FileFd To(Itm->DestFile,FileFd::WriteEmpty);
+   FileFd To(Itm->DestFile,FileFd::WriteAtomic);
    To.EraseOnFailure();
    if (_error->PendingError() == true)
    {