summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2018-12-17 11:42:54 +0100
committerGitHub <noreply@github.com>2018-12-17 11:42:54 +0100
commitc23735244623384b3d1210d7edb4072ae8cf3a1b (patch)
tree3557232d4eb77d86aea88718dc4f44b54b7e2dd3
parentf3b41aefb7d1338e309734005af3c7b5e8d352de (diff)
parent2f39223ec449b0caf6163ae187fe4bdc02833ed9 (diff)
Merge pull request #438 from rdoeffinger/checkconfig
For config check, check that the selected binary is available.
-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());
}