Config: Don't save empty sections.

This commit is contained in:
Unknown W. Brackets 2019-07-14 15:07:13 -07:00
parent ecf509c362
commit c77f5da9ea

View file

@ -597,7 +597,7 @@ bool IniFile::Save(const char* filename)
out << "\xEF\xBB\xBF";
for (const Section &section : sections) {
if (!section.name().empty()) {
if (!section.name().empty() && (!section.lines.empty() || !section.comment.empty())) {
out << "[" << section.name() << "]" << section.comment << std::endl;
}