*** empty log message ***

This commit is contained in:
Joe Shochet 2000-12-15 03:52:33 +00:00
parent 5d8d9a4892
commit 2a018ab8e0
2 changed files with 10 additions and 3 deletions

View File

@ -45,6 +45,7 @@ void Extractor::
init(PT(Buffer) buffer) { init(PT(Buffer) buffer) {
nassertv(!buffer.is_null()); nassertv(!buffer.is_null());
_buffer = buffer; _buffer = buffer;
_mfile = NULL;
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -54,6 +55,8 @@ init(PT(Buffer) buffer) {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
Extractor:: Extractor::
~Extractor(void) { ~Extractor(void) {
if (_mfile != NULL)
delete _mfile;
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -84,7 +87,10 @@ initiate(Filename &source_file, const Filename &rel_path) {
_total_bytes_read = 0; _total_bytes_read = 0;
_read_all_input = false; _read_all_input = false;
_handled_all_input = false; _handled_all_input = false;
_mfile.reset(); //_mfile.reset();
if (_mfile != NULL)
delete _mfile;
_mfile = new Multifile;
return ES_success; return ES_success;
} }
@ -109,9 +115,10 @@ run(void) {
// Write to the out file // Write to the out file
char *start = _buffer->_buffer; char *start = _buffer->_buffer;
int size = _source_buffer_length; int size = _source_buffer_length;
if (_mfile.write(start, size, _rel_path) == true) { if (_mfile->write(start, size, _rel_path) == true) {
_read_stream.close(); _read_stream.close();
_source_file.unlink(); _source_file.unlink();
delete _mfile;
return ES_success; return ES_success;
} }
return ES_ok; return ES_ok;

View File

@ -44,7 +44,7 @@ private:
ifstream _read_stream; ifstream _read_stream;
int _source_file_length; int _source_file_length;
Multifile _mfile; Multifile *_mfile;
int _total_bytes_read; int _total_bytes_read;
bool _read_all_input; bool _read_all_input;
bool _handled_all_input; bool _handled_all_input;