]> git.saurik.com Git - apt.git/blobdiff - methods/bzip2.cc
fix the testcases which were broken by the new space between number and unit
[apt.git] / methods / bzip2.cc
index 241f21c66bd3a30588ef85c7e5bc9da223280a2b..c668141a2919622c7809b76fac64de55261ad8e4 100644 (file)
@@ -56,12 +56,9 @@ bool Bzip2Method::Fetch(FetchItem *Itm)
    // Open the source and destination files
    FileFd From(Path,FileFd::ReadOnly);
 
-   // if the file is empty, just rename it and return
-   if(From.Size() == 0) 
-   {
-      rename(Path.c_str(), Itm->DestFile.c_str());
-      return true;
-   }
+   // FIXME add an error message saying that empty files can't be valid archives
+   if(From.Size() == 0)
+      return false;
 
    int GzOut[2];   
    if (pipe(GzOut) < 0)