]> git.saurik.com Git - apt.git/blobdiff - apt-inst/dirstream.cc
Merge branch 'debian/sid' of ssh://git.debian.org/git/apt/apt into debian/sid
[apt.git] / apt-inst / dirstream.cc
index 9b6a568482a5206af9dc9a84b6a6dec305be9cd9..65d1aa188a6b3080fa7e8c3177d53ff0e6c124ba 100644 (file)
@@ -11,6 +11,8 @@
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
+#include<config.h>
+
 #include <apt-pkg/dirstream.h>
 #include <apt-pkg/error.h>
 
 #include <apt-pkg/dirstream.h>
 #include <apt-pkg/error.h>
 
@@ -44,15 +46,13 @@ bool pkgDirStream::DoItem(Item &Itm,int &Fd)
         // fchmod deals with umask and fchown sets the ownership
         if (fchmod(iFd,Itm.Mode) != 0)
         {
         // fchmod deals with umask and fchown sets the ownership
         if (fchmod(iFd,Itm.Mode) != 0)
         {
-           _error->Errno("fchmod",_("Failed to write file %s"), Itm.Name);
            close(iFd);
            close(iFd);
-           return false;
+           return _error->Errno("fchmod",_("Failed to write file %s"), Itm.Name);
         }
         if (fchown(iFd,Itm.UID,Itm.GID) != 0 && errno != EPERM)
         {
         }
         if (fchown(iFd,Itm.UID,Itm.GID) != 0 && errno != EPERM)
         {
-           return _error->Errno("fchown",_("Failed to write file %s"), Itm.Name);
            close(iFd);
            close(iFd);
-           return false;
+           return _error->Errno("fchown",_("Failed to write file %s"), Itm.Name);
         }
         Fd = iFd;
         return true;
         }
         Fd = iFd;
         return true;