зеркало из https://github.com/mozilla/pjs.git
move file->close() into the if() clause. b=382508, r=luser
This commit is contained in:
Родитель
7f519814f1
Коммит
90dc1e6607
|
@ -155,9 +155,9 @@ bool ReadStringsFromFile(const string& path,
|
||||||
bool success = false;
|
bool success = false;
|
||||||
if (f->is_open()) {
|
if (f->is_open()) {
|
||||||
success = ReadStrings(*f, strings, unescape);
|
success = ReadStrings(*f, strings, unescape);
|
||||||
|
f->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
f->close();
|
|
||||||
delete f;
|
delete f;
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
@ -192,9 +192,9 @@ bool WriteStringsToFile(const string& path,
|
||||||
bool success = false;
|
bool success = false;
|
||||||
if (f->is_open()) {
|
if (f->is_open()) {
|
||||||
success = WriteStrings(*f, header, strings, escape);
|
success = WriteStrings(*f, header, strings, escape);
|
||||||
|
f->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
f->close();
|
|
||||||
delete f;
|
delete f;
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче