be explicit about truncating

This commit is contained in:
David Rose 2002-11-12 02:09:41 +00:00
parent 852aefe7b5
commit 5b06bb25bd

View File

@ -157,7 +157,7 @@ open_read(const Filename &multifile_name) {
// Access: Published // Access: Published
// Description: Opens the named Multifile on disk for writing. If // Description: Opens the named Multifile on disk for writing. If
// there already exists a file by that name, it is // there already exists a file by that name, it is
// deleted. The Multifile is then prepared for // truncated. The Multifile is then prepared for
// accepting a brand new set of subfiles, which will be // accepting a brand new set of subfiles, which will be
// written to the indicated filename. Individual // written to the indicated filename. Individual
// subfiles may not be extracted or read. // subfiles may not be extracted or read.
@ -170,7 +170,7 @@ open_write(const Filename &multifile_name) {
close(); close();
Filename fname = multifile_name; Filename fname = multifile_name;
fname.set_binary(); fname.set_binary();
if (!fname.open_write(_write_file)) { if (!fname.open_write(_write_file, true)) {
return false; return false;
} }
_write = &_write_file; _write = &_write_file;
@ -799,7 +799,7 @@ extract_subfile(int index, const Filename &filename) {
fname.set_binary(); fname.set_binary();
fname.make_dir(); fname.make_dir();
ofstream out; ofstream out;
if (!fname.open_write(out)) { if (!fname.open_write(out, true)) {
express_cat.info() express_cat.info()
<< "Unable to write to file " << filename << "\n"; << "Unable to write to file " << filename << "\n";
return false; return false;