]> git.saurik.com Git - apt.git/blobdiff - test/interactive-helper/extract-control.cc
webserver: implement ~user access to ~user/public_html/
[apt.git] / test / interactive-helper / extract-control.cc
index 29dcbf371bdaf68663dcfb753f0815269bc2fd15..3f7feabcba95b52902236feffd603a8df37b1dfe 100644 (file)
@@ -1,5 +1,6 @@
 #include <apt-pkg/debfile.h>
 #include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
 
 #include <iostream>
 #include <unistd.h>
@@ -20,8 +21,7 @@ bool ExtractMember(const char *File,const char *Member)
    if (Extract.Control == 0)
       return true;
    
-   write(STDOUT_FILENO,Extract.Control,Extract.Length);
-   return true;
+   return write(STDOUT_FILENO,Extract.Control,Extract.Length) != -1;
 }
 
 int main(int argc, const char *argv[])