aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/gpgtar-create.c11
-rw-r--r--tools/gpgtar-extract.c7
-rw-r--r--tools/gpgtar.c5
3 files changed, 10 insertions, 13 deletions
diff --git a/tools/gpgtar-create.c b/tools/gpgtar-create.c
index 80860befd..d17467077 100644
--- a/tools/gpgtar-create.c
+++ b/tools/gpgtar-create.c
@@ -36,7 +36,6 @@
# include <pwd.h>
# include <grp.h>
#endif /*!HAVE_W32_SYSTEM*/
-#include <assert.h>
#include "../common/i18n.h"
#include "../common/exectool.h"
@@ -114,7 +113,7 @@ fillup_entry_w32 (tar_header_t hdr)
for (p=hdr->name; *p; p++)
if (*p == '/')
*p = '\\';
- wfname = utf8_to_wchar (hdr->name);
+ wfname = gpgrt_fname_to_wchar (hdr->name);
for (p=hdr->name; *p; p++)
if (*p == '\\')
*p = '/';
@@ -345,7 +344,7 @@ scan_directory (const char *dname, scanctrl_t scanctrl)
for (p=fname; *p; p++)
if (*p == '/')
*p = '\\';
- wfname = utf8_to_wchar (fname);
+ wfname = gpgrt_fname_to_wchar (fname);
xfree (fname);
if (!wfname)
{
@@ -448,7 +447,7 @@ scan_recursive (const char *dname, scanctrl_t scanctrl)
}
scanctrl->nestlevel++;
- assert (scanctrl->flist_tail);
+ log_assert (scanctrl->flist_tail);
start_tail = scanctrl->flist_tail;
scan_directory (dname, scanctrl);
stop_tail = scanctrl->flist_tail;
@@ -903,7 +902,7 @@ write_file (estream_t stream, tar_header_t hdr)
if (hdr->typeflag == TF_REGULAR)
{
- infp = es_fopen (hdr->name, "rb");
+ infp = es_fopen (hdr->name, "rb,sysopen");
if (!infp)
{
err = gpg_error_from_syserror ();
@@ -1142,7 +1141,7 @@ gpgtar_create (char **inpattern, const char *files_from, int null_names,
if (!strcmp (opt.outfile, "-"))
outstream = es_stdout;
else
- outstream = es_fopen (opt.outfile, "wb");
+ outstream = es_fopen (opt.outfile, "wb,sysopen");
if (!outstream)
{
err = gpg_error_from_syserror ();
diff --git a/tools/gpgtar-extract.c b/tools/gpgtar-extract.c
index e9baada4e..5fad893c5 100644
--- a/tools/gpgtar-extract.c
+++ b/tools/gpgtar-extract.c
@@ -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 ();
diff --git a/tools/gpgtar.c b/tools/gpgtar.c
index a06e870ad..57cac7c94 100644
--- a/tools/gpgtar.c
+++ b/tools/gpgtar.c
@@ -34,7 +34,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <assert.h>
#define INCLUDED_BY_MAIN_MODULE 1
#include "../common/util.h"
@@ -261,7 +260,7 @@ shell_parse_stringlist (const char *str, strlist_t *r_list)
break;
case doublequote:
- assert (s > str || !"cannot be quoted at first char");
+ log_assert (s > str || !"cannot be quoted at first char");
if (*s == doublequote && *(s - 1) != '\\')
quoted = unquoted;
else
@@ -269,7 +268,7 @@ shell_parse_stringlist (const char *str, strlist_t *r_list)
break;
default:
- assert (! "reached");
+ log_assert (! "reached");
}
}