summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2015-09-24 22:13:52 +0200
committerAnne Jan Brouwer <annejan@noprotocol.com>2015-09-24 22:13:52 +0200
commitef56e3535f0b0eecd49a36c3d6d0a012032fff22 (patch)
tree1f7f7414c8a5e804941a246e3578ddba9d354dd4
parent1f9574a631439deebfc639f4255aa89a8744617d (diff)
Adding trailing newline to password file, fixes #93
-rw-r--r--mainwindow.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
index cea11895..d9ab8420 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -1026,6 +1026,10 @@ void MainWindow::setPassword(QString file, bool overwrite, bool isNew = false)
return;
}
+ if (newValue.right(1) != "\n") {
+ newValue += "\n";
+ }
+
currentAction = EDIT;
if (usePass) {
QString force(overwrite ? " -f " : " ");