mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpgtar,w32: Support file names longer than MAX_PATH.
* tools/gpgtar.c: Replace assert by log_assert. * tools/gpgtar-extract.c: Ditto. (extract_regular): Create files with sysopen flag. * tools/gpgtar-create.c (scan_directory): Use gpgrt_fname_to_wchar. -- Note that for this change libgpg-error 1.45 is required for Windows.
This commit is contained in:
parent
6afedbcd47
commit
70b738f93f
3 changed files with 10 additions and 13 deletions
|
@ -28,7 +28,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "../common/i18n.h"
|
||||
#include "../common/exectool.h"
|
||||
|
@ -98,9 +97,9 @@ extract_regular (estream_t stream, const char *dirname,
|
|||
|
||||
|
||||
if (opt.dry_run)
|
||||
outfp = es_fopenmem (0, "wb");
|
||||
outfp = es_fopen ("/dev/null", "wb");
|
||||
else
|
||||
outfp = es_fopen (fname, "wb");
|
||||
outfp = es_fopen (fname, "wb,sysopen");
|
||||
if (!outfp)
|
||||
{
|
||||
err = gpg_error_from_syserror ();
|
||||
|
@ -333,7 +332,7 @@ gpgtar_extract (const char *filename, int decrypt)
|
|||
if (!strcmp (filename, "-"))
|
||||
stream = es_stdin;
|
||||
else
|
||||
stream = es_fopen (filename, "rb");
|
||||
stream = es_fopen (filename, "rb,sysopen");
|
||||
if (!stream)
|
||||
{
|
||||
err = gpg_error_from_syserror ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue