*** empty log message ***

This commit is contained in:
Mike Goslin 2000-12-07 04:33:54 +00:00
parent 0a29169b5c
commit 289095dfe2
2 changed files with 11 additions and 0 deletions

View File

@ -261,6 +261,12 @@ decompress(Filename &source_file, Filename &dest_file) {
// Determine source file length
read_stream.seekg(0, ios::end);
int source_file_length = read_stream.tellg();
if (source_file_length == 0) {
downloader_cat.warning()
<< "Decompressor::decompress() - Zero length file: "
<< source_file << endl;
return true;
}
read_stream.seekg(0, ios::beg);
// Open destination file

View File

@ -27,6 +27,11 @@ main(int argc, char *argv[]) {
int source_file_length = read_stream.tellg();
read_stream.seekg(0, ios::beg);
if (source_file_length == 0) {
cerr << "zero length file: " << source_file << endl;
return 1;
}
// Open destination file
ofstream write_stream;
dest_file.set_binary();