]> git.saurik.com Git - apt.git/blobdiff - methods/bzip2.cc
merged from lp:~donkult/apt/experimental
[apt.git] / methods / bzip2.cc
index c668141a2919622c7809b76fac64de55261ad8e4..eff83bda737e9b775039bc7fef948a6b475b5744 100644 (file)
@@ -13,6 +13,8 @@
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
+#include <config.h>
+
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/acquire-method.h>
@@ -56,9 +58,8 @@ bool Bzip2Method::Fetch(FetchItem *Itm)
    // Open the source and destination files
    FileFd From(Path,FileFd::ReadOnly);
 
-   // FIXME add an error message saying that empty files can't be valid archives
-   if(From.Size() == 0)
-      return false;
+   if(From.FileSize() == 0)
+      return _error->Error(_("Empty files can't be valid archives"));
 
    int GzOut[2];   
    if (pipe(GzOut) < 0)