diff options
author | Werner Koch <wk@gnupg.org> | 2020-10-20 11:52:16 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2020-10-20 12:15:56 +0200 |
commit | 390497ea115e1aca93feec297a5bd6ae7b1ba6dd (patch) | |
tree | 675448ff809e3f333bba4918e4787eacda7f8190 /g10/migrate.c | |
parent | Replace all calls to access by gnupg_access (diff) | |
download | gnupg2-390497ea115e1aca93feec297a5bd6ae7b1ba6dd.tar.xz gnupg2-390497ea115e1aca93feec297a5bd6ae7b1ba6dd.zip |
Replace most of the remaining stdio calls by estream calls.
--
We need to use es_fopen on Windows to cope with non-ascii file names.
This is quite a large but fortunately straightforward change. At a
very few places we keep using stdio (for example due to the use of
popen).
GnuPG-bug-id: 5098
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/migrate.c')
-rw-r--r-- | g10/migrate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/migrate.c b/g10/migrate.c index 9045ae66e..38fb7bd68 100644 --- a/g10/migrate.c +++ b/g10/migrate.c @@ -99,8 +99,8 @@ migrate_secring (ctrl_t ctrl) log_info ("porting secret keys from '%s' to gpg-agent\n", secring); if (!import_old_secring (ctrl, secring)) { - FILE *fp = fopen (flagfile, "w"); - if (!fp || fclose (fp)) + estream_t fp = es_fopen (flagfile, "w"); + if (!fp || es_fclose (fp)) log_error ("error creating flag file '%s': %s\n", flagfile, gpg_strerror (gpg_error_from_syserror ())); else |