summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mainwindow.cpp31
-rw-r--r--qtpass.spec2
2 files changed, 23 insertions, 10 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 4fa02211..f397d531 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -1393,9 +1393,11 @@ void MainWindow::on_usersButton_clicked() {
tr("Failed to open .gpg-id for writing."));
return;
}
+ QString initstring = "";
bool secret_selected = false;
foreach(const UserInfo &user, users) {
if (user.enabled) {
+ initstring += " " + user.key_id;
gpgId.write((user.key_id + "\n").toUtf8());
secret_selected |= user.have_secret;
}
@@ -1407,15 +1409,26 @@ void MainWindow::on_usersButton_clicked() {
tr("None of the selected keys have a secret key available.\n"
"You will not be able to decrypt any newly added passwords!"));
}
- if (!useWebDav && useGit && !gitExecutable.isEmpty()) {
- if (addFile)
- executeWrapper(gitExecutable, "add \"" + gpgIdFile + '"');
- QString path = gpgIdFile;
- path.replace(QRegExp("\\.gpg$"), "");
- executeWrapper(gitExecutable, "commit \"" + gpgIdFile + "\" -m \"Added " +
- path + " using QtPass.\"");
- if (autoPush)
- on_pushButton_clicked();
+ if (usePass) {
+ QString initDir = currentDir.isEmpty()
+ ? getDir(ui->treeView->currentIndex(), true)
+ : currentDir;
+ executePass("init \"" + initDir + "\" " + initstring);
+ qDebug() << initDir + initstring;
+ } else {
+ // TODO reencrypt
+
+
+ if (!useWebDav && useGit && !gitExecutable.isEmpty()) {
+ if (addFile)
+ executeWrapper(gitExecutable, "add \"" + gpgIdFile + '"');
+ QString path = gpgIdFile;
+ path.replace(QRegExp("\\.gpg$"), "");
+ executeWrapper(gitExecutable, "commit \"" + gpgIdFile + "\" -m \"Added " +
+ path + " using QtPass.\"");
+ if (autoPush)
+ on_pushButton_clicked();
+ }
}
}
diff --git a/qtpass.spec b/qtpass.spec
index 2e1f8bb0..08afeeb7 100644
--- a/qtpass.spec
+++ b/qtpass.spec
@@ -7,7 +7,7 @@
# This should probably be part of a release process.
Name: qtpass
-Version: 1.1.0
+Version: 1.1.1
Release: 2%{?dist}
Summary: QtPass is a multi-platform GUI for pass, the standard unix password manager.
License: GPLv3