mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
Support "-" for --output.
This commit is contained in:
parent
fa3120a1bc
commit
041c6d7261
@ -1,3 +1,8 @@
|
||||
2010-08-11 Werner Koch <wk@g10code.com>
|
||||
|
||||
* gpgtar-create.c (gpgtar_create): Allow "-" for stdout in
|
||||
opt.outfile. Switch es_stdout to binary mode.
|
||||
|
||||
2010-08-09 Werner Koch <wk@g10code.com>
|
||||
|
||||
* watchgnupg.c: Inlcude in.h and inet.h.
|
||||
|
@ -843,7 +843,10 @@ gpgtar_create (char **inpattern)
|
||||
|
||||
if (opt.outfile)
|
||||
{
|
||||
outstream = es_fopen (opt.outfile, "wb");
|
||||
if (!strcmp (opt.outfile, "-"))
|
||||
outstream = es_stdout;
|
||||
else
|
||||
outstream = es_fopen (opt.outfile, "wb");
|
||||
if (!outstream)
|
||||
{
|
||||
err = gpg_error_from_syserror ();
|
||||
@ -857,6 +860,9 @@ gpgtar_create (char **inpattern)
|
||||
outstream = es_stdout;
|
||||
}
|
||||
|
||||
if (outstream == es_stdout)
|
||||
es_set_binary (es_stdout);
|
||||
|
||||
for (hdr = scanctrl->flist; hdr; hdr = hdr->next)
|
||||
{
|
||||
err = write_file (outstream, hdr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user