mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
*** empty log message ***
This commit is contained in:
parent
0a29169b5c
commit
289095dfe2
@ -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
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user