mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-21 23:38:49 -05:00
ensure gpgdir has a trailing slash
init_gpgme checks for various paths under gpgdir by concatenating them directly, giving warning messages incorrectly if gpgdir does not end with '/'. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
2ee7a8d89a
commit
ce1f453b74
@ -542,17 +542,11 @@ int SYMEXPORT alpm_option_set_logfile(alpm_handle_t *handle, const char *logfile
|
|||||||
|
|
||||||
int SYMEXPORT alpm_option_set_gpgdir(alpm_handle_t *handle, const char *gpgdir)
|
int SYMEXPORT alpm_option_set_gpgdir(alpm_handle_t *handle, const char *gpgdir)
|
||||||
{
|
{
|
||||||
|
int err;
|
||||||
CHECK_HANDLE(handle, return -1);
|
CHECK_HANDLE(handle, return -1);
|
||||||
if(!gpgdir) {
|
if((err = _alpm_set_directory_option(gpgdir, &(handle->gpgdir), 0))) {
|
||||||
handle->pm_errno = ALPM_ERR_WRONG_ARGS;
|
RET_ERR(handle, err, -1);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(handle->gpgdir) {
|
|
||||||
FREE(handle->gpgdir);
|
|
||||||
}
|
|
||||||
STRDUP(handle->gpgdir, gpgdir, RET_ERR(handle, ALPM_ERR_MEMORY, -1));
|
|
||||||
|
|
||||||
_alpm_log(handle, ALPM_LOG_DEBUG, "option 'gpgdir' = %s\n", handle->gpgdir);
|
_alpm_log(handle, ALPM_LOG_DEBUG, "option 'gpgdir' = %s\n", handle->gpgdir);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user