summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2018-09-05 19:29:07 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2018-12-12 21:22:32 +0100
commit2f39223ec449b0caf6163ae187fe4bdc02833ed9 (patch)
tree3557232d4eb77d86aea88718dc4f44b54b7e2dd3
parentf3b41aefb7d1338e309734005af3c7b5e8d352de (diff)
For config check, check that the selected binary is available.
pass being available is irrelevant if QtPass was configured to use gpg for example.
-rw-r--r--src/util.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util.cpp b/src/util.cpp
index e288e25b..b830b194 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -131,8 +131,9 @@ QString Util::findBinaryInPath(QString binary) {
bool Util::checkConfig() {
return !QFile(QDir(QtPassSettings::getPassStore()).filePath(".gpg-id"))
.exists() ||
- (!QtPassSettings::getPassExecutable().startsWith("wsl ") &&
- !QFile(QtPassSettings::getPassExecutable()).exists() &&
+ (QtPassSettings::isUsePass() ?
+ !QtPassSettings::getPassExecutable().startsWith("wsl ") &&
+ !QFile(QtPassSettings::getPassExecutable()).exists() :
!QtPassSettings::getGpgExecutable().startsWith("wsl ") &&
!QFile(QtPassSettings::getGpgExecutable()).exists());
}