diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-10-13 15:36:54 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-10-13 15:36:54 +0200 |
commit | 61153c284c832a0d0f7faecd9ad96f6cd9591c64 (patch) | |
tree | a60d61b723bbc90b8b715a476c5f1ee5e8d6e0c2 /methods/bzip2.cc | |
parent | 940ff5d6b5634b57c2e622b5295f499a7807f3de (diff) | |
parent | 6bea738672fb503d2813ae2d998096015a81c4a2 (diff) |
merged from debian-sid branch
Diffstat (limited to 'methods/bzip2.cc')
-rw-r--r-- | methods/bzip2.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/methods/bzip2.cc b/methods/bzip2.cc index 241f21c66..c668141a2 100644 --- a/methods/bzip2.cc +++ b/methods/bzip2.cc @@ -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) |