tools/gpgtar: Fix handling of '-'.

* 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>
This commit is contained in:
Justus Winter 2016-06-28 15:03:07 +02:00
parent d36f664bfd
commit 4819f687c4
2 changed files with 2 additions and 2 deletions

View 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)

View 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)