mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
Changed option names.
Add O_BINARY for stdin and stdout.
This commit is contained in:
parent
d9791119d0
commit
789732e05a
@ -1,3 +1,15 @@
|
||||
2010-08-25 Werner Koch <wk@g10code.com>
|
||||
|
||||
* gpgtar.c: Add -t as short option for --list-archive.
|
||||
|
||||
* gpgtar-extract.c (gpgtar_extract): Use filename "-" for stdin.
|
||||
Fix dirprefix setting.
|
||||
* gpgtar-list.c (gpgtar_list): Ditto.
|
||||
|
||||
2010-08-24 Werner Koch <wk@g10code.com>
|
||||
|
||||
* gpgtar.c (opts): Fix --cms and --openpgp names.
|
||||
|
||||
2010-08-23 Werner Koch <wk@g10code.com>
|
||||
|
||||
* gpgconf-comp.c (GPGNAME) [W32CE]: s/gpg2/gpg/.
|
||||
|
@ -79,7 +79,7 @@ extract_regular (estream_t stream, const char *dirname,
|
||||
|
||||
leave:
|
||||
if (!err && opt.verbose)
|
||||
log_info ("extracted `%s/'\n", fname);
|
||||
log_info ("extracted `%s'\n", fname);
|
||||
es_fclose (outfp);
|
||||
if (err && fname && outfp)
|
||||
{
|
||||
@ -270,7 +270,10 @@ gpgtar_extract (const char *filename)
|
||||
|
||||
if (filename)
|
||||
{
|
||||
stream = es_fopen (filename, "rb");
|
||||
if (!strcmp (filename, "-"))
|
||||
stream = es_stdout;
|
||||
else
|
||||
stream = es_fopen (filename, "rb");
|
||||
if (!stream)
|
||||
{
|
||||
err = gpg_error_from_syserror ();
|
||||
@ -279,20 +282,26 @@ gpgtar_extract (const char *filename)
|
||||
}
|
||||
}
|
||||
else
|
||||
stream = es_stdin; /* FIXME: How can we enforce binary mode? */
|
||||
stream = es_stdin;
|
||||
|
||||
if (stream == es_stdin)
|
||||
es_set_binary (es_stdin);
|
||||
|
||||
if (filename)
|
||||
{
|
||||
dirprefix = strrchr (filename, '/');
|
||||
if (dirprefix)
|
||||
dirprefix++;
|
||||
else
|
||||
dirprefix = filename;
|
||||
}
|
||||
else if (opt.filename)
|
||||
{
|
||||
dirprefix = strrchr (opt.filename, '/');
|
||||
if (dirprefix)
|
||||
dirprefix++;
|
||||
else
|
||||
dirprefix = opt.filename;
|
||||
}
|
||||
|
||||
if (!dirprefix || !*dirprefix)
|
||||
|
@ -275,7 +275,10 @@ gpgtar_list (const char *filename)
|
||||
|
||||
if (filename)
|
||||
{
|
||||
stream = es_fopen (filename, "rb");
|
||||
if (!strcmp (filename, "-"))
|
||||
stream = es_stdout;
|
||||
else
|
||||
stream = es_fopen (filename, "rb");
|
||||
if (!stream)
|
||||
{
|
||||
err = gpg_error_from_syserror ();
|
||||
@ -284,7 +287,10 @@ gpgtar_list (const char *filename)
|
||||
}
|
||||
}
|
||||
else
|
||||
stream = es_stdin; /* FIXME: How can we enforce binary mode? */
|
||||
stream = es_stdin;
|
||||
|
||||
if (stream == es_stdin)
|
||||
es_set_binary (es_stdin);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@ -303,7 +309,7 @@ gpgtar_list (const char *filename)
|
||||
|
||||
leave:
|
||||
xfree (header);
|
||||
if (filename)
|
||||
if (stream != es_stdin)
|
||||
es_fclose (stream);
|
||||
return;
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ enum cmd_and_opt_values
|
||||
aEncrypt = 'e',
|
||||
aDecrypt = 'd',
|
||||
aSign = 's',
|
||||
aList = 't',
|
||||
|
||||
oSymmetric = 'c',
|
||||
oRecipient = 'r',
|
||||
@ -63,7 +64,6 @@ enum cmd_and_opt_values
|
||||
oOpenPGP,
|
||||
oCMS,
|
||||
oSetFilename,
|
||||
aList,
|
||||
oNull
|
||||
};
|
||||
|
||||
@ -91,8 +91,8 @@ static ARGPARSE_OPTS opts[] = {
|
||||
ARGPARSE_s_s (oFilesFrom, "files-from",
|
||||
N_("|FILE|get names to create from FILE")),
|
||||
ARGPARSE_s_n (oNull, "null", N_("-T reads null-terminated names")),
|
||||
ARGPARSE_s_n (oOpenPGP, "--openpgp", "@"),
|
||||
ARGPARSE_s_n (oCMS, "--cms", "@"),
|
||||
ARGPARSE_s_n (oOpenPGP, "openpgp", "@"),
|
||||
ARGPARSE_s_n (oCMS, "cms", "@"),
|
||||
|
||||
ARGPARSE_end ()
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user