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
|
@ -79,7 +79,7 @@ extract_regular (estream_t stream, const char *dirname,
|
|||
|
||||
leave:
|
||||
if (!err && opt.verbose)
|
||||
log_info ("extracted `%s/'\n", fname);
|
||||
log_info ("extracted `%s'\n", fname);
|
||||
es_fclose (outfp);
|
||||
if (err && fname && outfp)
|
||||
{
|
||||
|
@ -270,7 +270,10 @@ gpgtar_extract (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 ();
|
||||
|
@ -279,20 +282,26 @@ gpgtar_extract (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);
|
||||
|
||||
if (filename)
|
||||
{
|
||||
dirprefix = strrchr (filename, '/');
|
||||
if (dirprefix)
|
||||
dirprefix++;
|
||||
else
|
||||
dirprefix = filename;
|
||||
}
|
||||
else if (opt.filename)
|
||||
{
|
||||
dirprefix = strrchr (opt.filename, '/');
|
||||
if (dirprefix)
|
||||
dirprefix++;
|
||||
else
|
||||
dirprefix = opt.filename;
|
||||
}
|
||||
|
||||
if (!dirprefix || !*dirprefix)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue