Verified Commit d3ea942a authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Take GnuPG Homedir from gpgconf

This is more robust then trying to reimplement gnupg's
homedir logic ourself.
parent 903645a7
Pipeline #39712 canceled with stage
......@@ -47,16 +47,8 @@ using namespace GpgME;
QString Kleo::gnupgHomeDirectory()
{
#ifdef Q_OS_WIN
return QFile::decodeName(default_homedir());
#else
const QByteArray gnupgHome = qgetenv("GNUPGHOME");
if (!gnupgHome.isEmpty()) {
return QFile::decodeName(gnupgHome);
} else {
return QDir::homePath() + QLatin1String("/.gnupg");
}
#endif
static QString homeDir = QString::fromUtf8(GpgME::dirInfo("homedir"));
return homeDir;
}
int Kleo::makeGnuPGError(int code)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment