diff options
author | Ingo Klöcker <[email protected]> | 2024-06-04 14:52:24 +0000 |
---|---|---|
committer | Ingo Klöcker <[email protected]> | 2024-06-04 14:52:24 +0000 |
commit | 25dd284b0c42ba4ad434ce43f6ac93f24acd6498 (patch) | |
tree | 77cc38eb5952dce60d03c838d347eb9cacac2608 /src/util.h | |
parent | build,python: Fix make distcheck for Python 3.9+ (diff) | |
download | gpgme-25dd284b0c42ba4ad434ce43f6ac93f24acd6498.tar.gz gpgme-25dd284b0c42ba4ad434ce43f6ac93f24acd6498.zip |
core,w32: Pass file names with forward slashes to gpg and gpgtar
src/conversion.c, src/util.h (_gpgme_replace_backslashes): New.
src/engine-gpg.c (_add_arg): Add argument file_name. On Windows, replace
backslashes in file name arguments with forward slashes.
(add_arg_ext, add_arg_with_locp, add_arg, add_arg_pfx, add_gpg_arg,
add_gpg_arg_with_value, add_arg_len): Adjust call of _add_arg.
(add_file_name_arg, add_file_name_arg_len, add_gpg_arg_with_file_name):
New.
(add_file_name_arg_or_data): Call add_file_name_arg for file name.
(gpg_new): Call add_gpg_arg_with_file_name for home directory.
(gpg_decrypt): Call add_file_name_arg for output directory and output
file name.
(append_args_from_recipients_string): Call add_file_name_arg_len for
recipients file name.
(gpg_encrypt): Call add_file_name_arg for output file name, base
directory and input file name. Call add_gpg_arg_with_file_name to set
file name stored in message.
(gpg_encrypt_sign): Call add_file_name_arg for output file name, base
directory and input file name. Call add_gpg_arg_with_file_name to set
file name stored in message.
(gpg_sign): Call add_file_name_arg for output file name, base directory
and input file name. Call add_gpg_arg_with_file_name to set file name
stored in message.
(gpg_verify): Call add_file_name_arg for output directory and output
file name.
--
By passing all file names with forward slashes to gpg and gpgtar we
avoid problems caused by the quoting of backslashes.
GnuPG-bug-id: 7141
Diffstat (limited to '')
-rw-r--r-- | src/util.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -163,6 +163,9 @@ int _gpgme_map_pk_algo (int algo, gpgme_protocol_t protocol); const char *_gpgme_cipher_algo_name (int algo, gpgme_protocol_t protocol); const char *_gpgme_cipher_mode_name (int algo, gpgme_protocol_t protocol); +/* Replace all backslashes in STRING with forward slashes. */ +void _gpgme_replace_backslashes (char *string); + /*-- b64dec.c --*/ |