summaryrefslogtreecommitdiffstats
path: root/src/imitatepass.cpp
diff options
context:
space:
mode:
authorMario Schlegel <m.schlegel@posteo.de>2018-11-04 09:54:02 +0100
committerMario Schlegel <m.schlegel@posteo.de>2018-11-04 09:54:02 +0100
commit8d7caa4c1c875859120c4cea79bc24ca015df2d1 (patch)
treeb092f6760d7e7c94ed78fa186635fb2212df59bf /src/imitatepass.cpp
parent32ea1ad39a51b0d1b7e7b24351ae1139c3f5dbec (diff)
Split keys on any newline character (line feed or carriage return)
actualKeys was empty on Windows because of extra carriage return characters.
Diffstat (limited to 'src/imitatepass.cpp')
-rw-r--r--src/imitatepass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imitatepass.cpp b/src/imitatepass.cpp
index f1c84e40..cf8a1586 100644
--- a/src/imitatepass.cpp
+++ b/src/imitatepass.cpp
@@ -248,7 +248,7 @@ void ImitatePass::reencryptPath(QString dir) {
exec.executeBlocking(QtPassSettings::getGpgExecutable(), args, &keys, &err);
QStringList actualKeys;
keys += err;
- QStringList key = keys.split("\n");
+ QStringList key = keys.split(QRegExp("[\r\n]"), QString::SkipEmptyParts);
QListIterator<QString> itr(key);
while (itr.hasNext()) {
QString current = itr.next();