aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-06-28 13:03:07 +0000
committerJustus Winter <[email protected]>2016-06-28 13:03:07 +0000
commit4819f687c48c7972c39ae29c7af1e891a4d57360 (patch)
treebfd11a17dad4b34860a76c161a6c71f5d72dd5d8
parentcommon: Close input stream. (diff)
downloadgnupg-4819f687c48c7972c39ae29c7af1e891a4d57360.tar.gz
gnupg-4819f687c48c7972c39ae29c7af1e891a4d57360.zip
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 <[email protected]>
-rw-r--r--tools/gpgtar-extract.c2
-rw-r--r--tools/gpgtar-list.c2
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)