mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdConfig: Added check for empty file
This commit is contained in:
parent
d879833ebe
commit
f0cc48f4f1
1 changed files with 2 additions and 1 deletions
|
@ -116,7 +116,8 @@ static bool setConfigVariable (const Rules& rules, std::string name, std::string
|
||||||
// new leaf/value properly. But that's non-trivial.
|
// new leaf/value properly. But that's non-trivial.
|
||||||
|
|
||||||
// Add blank line required by rules.
|
// Add blank line required by rules.
|
||||||
if (lines.back () != "")
|
if (lines.size () &&
|
||||||
|
lines.back () != "")
|
||||||
lines.push_back ("");
|
lines.push_back ("");
|
||||||
|
|
||||||
// Add new line.
|
// Add new line.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue