Skip to content

Commit

Permalink
For config check, check that the selected binary is available.
Browse files Browse the repository at this point in the history
pass being available is irrelevant if QtPass was configured to
use gpg for example.
  • Loading branch information
rdoeffinger committed Dec 12, 2018
1 parent f3b41ae commit 2f39223
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 2f39223

Please sign in to comment.