aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpgtar.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-08-21 19:28:28 +0000
committerWerner Koch <[email protected]>2020-08-21 19:28:28 +0000
commit34e7703a962809921e83770f20f3eb66599265d1 (patch)
tree2d5f0418759d91c779add74bd2e865c8bef518dc /tools/gpgtar.h
parentcommon: Use gpgrt functions for mkdir and chdir. (diff)
downloadgnupg-34e7703a962809921e83770f20f3eb66599265d1.tar.gz
gnupg-34e7703a962809921e83770f20f3eb66599265d1.zip
gpgtar,w32: Handle Unicode file names.
* tools/gpgtar.c (oUtf8Strings): New. (opts): Add option --utf8-strings. (parse_arguments): Set option. * tools/gpgtar.h (opt): Add field utf8strings. * tools/gpgtar-create.c (name_to_utf8): New. (fillup_entry_w32): Use that. (scan_directory): Ditto. (scan_directory) [W32]: Convert file name to utf8. (gpgtar_create): Convert pattern. -- Note that this works only with file names read from a file or if the specified files on the command line are plain ascii. When recursing into a directory Unicode file names work again. This limitation is due to main(int, char**) which can't get the wchar version. We could fix that but is needs a bit more work in our init code. GnuPG-bug-id: 4083 Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'tools/gpgtar.h')
-rw-r--r--tools/gpgtar.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/gpgtar.h b/tools/gpgtar.h
index 3e7aa5ed6..c931b8247 100644
--- a/tools/gpgtar.h
+++ b/tools/gpgtar.h
@@ -32,6 +32,7 @@ struct
unsigned int debug_level;
int quiet;
int dry_run;
+ int utf8strings;
const char *gpg_program;
strlist_t gpg_arguments;
const char *outfile;
@@ -121,7 +122,7 @@ struct tar_header_s
unsigned long long nrecords; /* Number of data records. */
- char name[1]; /* Filename (dynamically extended). */
+ char name[1]; /* Filename (UTF-8, dynamically extended). */
};