aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/ChangeLog5
-rw-r--r--tools/gpgtar-create.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/tools/ChangeLog b/tools/ChangeLog
index 252e7f972..c50e3a3bc 100644
--- a/tools/ChangeLog
+++ b/tools/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-11 Werner Koch <[email protected]>
+
+ * gpgtar-create.c (gpgtar_create): Allow "-" for stdout in
+ opt.outfile. Switch es_stdout to binary mode.
+
2010-08-09 Werner Koch <[email protected]>
* watchgnupg.c: Inlcude in.h and inet.h.
diff --git a/tools/gpgtar-create.c b/tools/gpgtar-create.c
index 7568c153a..3a18d7c69 100644
--- a/tools/gpgtar-create.c
+++ b/tools/gpgtar-create.c
@@ -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);