]> git.saurik.com Git - apt.git/blobdiff - apt-inst/contrib/extracttar.cc
* apt-inst/contrib/extracttar.cc:
[apt.git] / apt-inst / contrib / extracttar.cc
index 1a358d57e6fb34280edef6136d74d1738a088ccd..806ba796d687833839b3f52020facfe68e40ce94 100644 (file)
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
-#include <apt-pkg/extracttar.h>
+#include<config.h>
 
 
+#include <apt-pkg/dirstream.h>
+#include <apt-pkg/extracttar.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/configuration.h>
@@ -28,6 +30,7 @@
 #include <signal.h>
 #include <fcntl.h>
 #include <iostream>
 #include <signal.h>
 #include <fcntl.h>
 #include <iostream>
+
 #include <apti18n.h>
                                                                        /*}}}*/
 
 #include <apti18n.h>
                                                                        /*}}}*/
 
@@ -143,7 +146,7 @@ bool ExtractTar::StartGzip()
    }
 
    // Fix up our FDs
    }
 
    // Fix up our FDs
-   InFd.Fd(Pipes[0]);
+   InFd.OpenDescriptor(Pipes[0], FileFd::ReadOnly, FileFd::None, true);
    close(Pipes[1]);
    return true;
 }
    close(Pipes[1]);
    return true;
 }
@@ -336,7 +339,7 @@ bool ExtractTar::Go(pkgDirStream &Stream)
       }
       
       // And finish up
       }
       
       // And finish up
-      if (Itm.Size >= 0 && BadRecord == false)
+      if (BadRecord == false)
         if (Stream.FinishedFile(Itm,Fd) == false)
            return false;
       
         if (Stream.FinishedFile(Itm,Fd) == false)
            return false;