core: percent decode filename
* src/op-support.c (_gpgme_parse_plaintext): Decode filename as percent string. -- From gnupg/doc/DETAILS: If a filename is available it gets printed as the third argument, percent-escaped as usual. so we can use the usual percent decode function here. GnuPG-Bug-Id: T6852
This commit is contained in:
parent
f212de4a9e
commit
6baccdc0c3
@ -388,9 +388,12 @@ _gpgme_parse_plaintext (char *args, char **filenamep, int *r_mime)
|
|||||||
*tail = '\0';
|
*tail = '\0';
|
||||||
if (filenamep && *args != '\0')
|
if (filenamep && *args != '\0')
|
||||||
{
|
{
|
||||||
char *filename = strdup (args);
|
gpgme_error_t err = 0;
|
||||||
if (!filename)
|
char *filename = NULL;
|
||||||
return gpg_error_from_syserror ();
|
|
||||||
|
err = _gpgme_decode_percent_string (args, &filename, 0, 0);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
*filenamep = filename;
|
*filenamep = filename;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user