tools/gpgtar: Fix handling of '-'.
authorJustus Winter <justus@g10code.com>
Tue, 28 Jun 2016 13:03:07 +0000 (15:03 +0200)
committerJustus Winter <justus@g10code.com>
Tue, 28 Jun 2016 13:03:07 +0000 (15:03 +0200)
* tools/gpgtar-extract.c (gpgtar_extract): Use stdin if file is '-'.
* tools/gpgtar-list.c (gpgtar_list): Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
tools/gpgtar-extract.c
tools/gpgtar-list.c

index 866215b..cee609c 100644 (file)
@@ -282,7 +282,7 @@ gpgtar_extract (const char *filename, int decrypt)
   if (filename)
     {
       if (!strcmp (filename, "-"))
-        stream = es_stdout;
+        stream = es_stdin;
       else
         stream = es_fopen (filename, "rb");
       if (!stream)
index 1d59d9c..cb2e700 100644 (file)
@@ -282,7 +282,7 @@ gpgtar_list (const char *filename, int decrypt)
   if (filename)
     {
       if (!strcmp (filename, "-"))
-        stream = es_stdout;
+        stream = es_stdin;
       else
         stream = es_fopen (filename, "rb");
       if (!stream)