move file->close() into the if() clause. b=382508, r=luser

This commit is contained in:
dcamp@mozilla.com 2007-06-23 23:17:10 -07:00
parent bc0dcb7bfc
commit ec0b4e8a36

View File

@ -155,9 +155,9 @@ bool ReadStringsFromFile(const string& path,
bool success = false;
if (f->is_open()) {
success = ReadStrings(*f, strings, unescape);
f->close();
}
f->close();
delete f;
return success;
}
@ -192,9 +192,9 @@ bool WriteStringsToFile(const string& path,
bool success = false;
if (f->is_open()) {
success = WriteStrings(*f, header, strings, escape);
f->close();
}
f->close();
delete f;
return success;
}