diff options
author | Ingo Klöcker <[email protected]> | 2024-01-09 10:13:51 +0000 |
---|---|---|
committer | Ingo Klöcker <[email protected]> | 2024-01-09 10:13:51 +0000 |
commit | 7e520213c09dc1ce4f1431e0f32054a1b7cd1368 (patch) | |
tree | 2d90076d8b97cad3302e27581c7f352a83169c87 /lang | |
parent | qt: Fix validity for (sub)keys generated using QGpgMEQuickJob (diff) | |
download | gpgme-7e520213c09dc1ce4f1431e0f32054a1b7cd1368.tar.gz gpgme-7e520213c09dc1ce4f1431e0f32054a1b7cd1368.zip |
qt: Pass home directory with forward slashes when launching dirmngr
* lang/qt/src/qgpgmewkdlookupjob.cpp (startDirmngr): Replace backslashes
with forward slashes in homedir returned by GpgME::dirInfo.
--
This works around a bug which causes backslashes to be escaped (doubled)
twice on Windows, once by gpgme_op_spawn and once by the spawn helper
gpgme-w32spawn. The next versions of GnuPG 2.2 and 2.4 also have a
workaround for this.
GnuPG-bug-id: 6833
Diffstat (limited to 'lang')
-rw-r--r-- | lang/qt/src/qgpgmewkdlookupjob.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lang/qt/src/qgpgmewkdlookupjob.cpp b/lang/qt/src/qgpgmewkdlookupjob.cpp index e862f293..effacfdc 100644 --- a/lang/qt/src/qgpgmewkdlookupjob.cpp +++ b/lang/qt/src/qgpgmewkdlookupjob.cpp @@ -65,11 +65,13 @@ static GpgME::Error startDirmngr(Context *assuanCtx) qCDebug(QGPGME_LOG) << "Error: Failed to get context for spawn engine (" << err.asString() << ")"; } const auto gpgconfProgram = GpgME::dirInfo("gpgconf-name"); - const auto homedir = GpgME::dirInfo("homedir"); + // replace backslashes with forward slashes in homedir to work around bug T6833 + std::string homedir{GpgME::dirInfo("homedir")}; + std::replace(homedir.begin(), homedir.end(), '\\', '/'); const char *argv[] = { gpgconfProgram, "--homedir", - homedir, + homedir.c_str(), "--launch", "dirmngr", NULL |