mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Changed option names.
Add O_BINARY for stdin and stdout.
This commit is contained in:
parent
d9791119d0
commit
789732e05a
4 changed files with 36 additions and 9 deletions
|
@ -275,7 +275,10 @@ gpgtar_list (const char *filename)
|
|||
|
||||
if (filename)
|
||||
{
|
||||
stream = es_fopen (filename, "rb");
|
||||
if (!strcmp (filename, "-"))
|
||||
stream = es_stdout;
|
||||
else
|
||||
stream = es_fopen (filename, "rb");
|
||||
if (!stream)
|
||||
{
|
||||
err = gpg_error_from_syserror ();
|
||||
|
@ -284,7 +287,10 @@ gpgtar_list (const char *filename)
|
|||
}
|
||||
}
|
||||
else
|
||||
stream = es_stdin; /* FIXME: How can we enforce binary mode? */
|
||||
stream = es_stdin;
|
||||
|
||||
if (stream == es_stdin)
|
||||
es_set_binary (es_stdin);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
@ -303,7 +309,7 @@ gpgtar_list (const char *filename)
|
|||
|
||||
leave:
|
||||
xfree (header);
|
||||
if (filename)
|
||||
if (stream != es_stdin)
|
||||
es_fclose (stream);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue