From 4819f687c48c7972c39ae29c7af1e891a4d57360 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Tue, 28 Jun 2016 15:03:07 +0200 Subject: [PATCH] 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 --- tools/gpgtar-extract.c | 2 +- tools/gpgtar-list.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/gpgtar-extract.c b/tools/gpgtar-extract.c index 866215b2c..cee609c6a 100644 --- a/tools/gpgtar-extract.c +++ b/tools/gpgtar-extract.c @@ -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) diff --git a/tools/gpgtar-list.c b/tools/gpgtar-list.c index 1d59d9c65..cb2e70048 100644 --- a/tools/gpgtar-list.c +++ b/tools/gpgtar-list.c @@ -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)