diff --git a/panda/src/downloader/extractor.cxx b/panda/src/downloader/extractor.cxx index f6a86017c6..fe011e3e1d 100644 --- a/panda/src/downloader/extractor.cxx +++ b/panda/src/downloader/extractor.cxx @@ -84,7 +84,6 @@ initiate(Filename &source_file, const Filename &rel_path) { _total_bytes_read = 0; _read_all_input = false; _handled_all_input = false; - _mfile.reset(); return ES_success; } @@ -112,6 +111,7 @@ run(void) { if (_mfile.write(start, size, _rel_path) == true) { _read_stream.close(); _source_file.unlink(); + _mfile.reset(); return ES_success; } return ES_ok;