forked from msys2/MSYS2-packages
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See msys2/msys2-pacman#26 See https://dev.gnupg.org/T6369 This saves a gpg spawn for every gpgme_get_key() call, for example around 100ms when starting pacman.
- Loading branch information
Showing
2 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/src/engine.c b/src/engine.c | ||
index 69f1c150..a02d0405 100644 | ||
--- a/src/engine.c | ||
+++ b/src/engine.c | ||
@@ -449,7 +449,11 @@ _gpgme_set_engine_info (gpgme_engine_info_t info, gpgme_protocol_t proto, | ||
new_home_dir = NULL; | ||
} | ||
|
||
- new_version = engine_get_version (proto, new_file_name); | ||
+ if (info->version && strcmp (info->file_name, new_file_name) == 0) | ||
+ new_version = strdup (info->version); | ||
+ else | ||
+ new_version = engine_get_version (proto, new_file_name); | ||
+ | ||
if (!new_version) | ||
{ | ||
new_version = strdup ("1.0.0"); /* Fake one for dummy entries. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters