summaryrefslogtreecommitdiffstats
path: root/kbx
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-10-20 16:38:06 +0200
committerWerner Koch <wk@gnupg.org>2020-10-20 16:38:06 +0200
commit18e5dd7b03ced51611c9ba1345cf498a0aaf14a6 (patch)
treefaeb1e27f9ffdb049f2e0dec728229d9fd7703b6 /kbx
parentReplace most calls to open by a new wrapper. (diff)
downloadgnupg2-18e5dd7b03ced51611c9ba1345cf498a0aaf14a6.tar.xz
gnupg2-18e5dd7b03ced51611c9ba1345cf498a0aaf14a6.zip
Replace all calls to stat by gnupg_stat.
* common/sysutils.c (gnupg_stat): New. * common/sysutils.h: Include sys/stat.h. -- Yet another wrapper for Unicode support on Windows. GnuPG-bug-id: 5098 Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'kbx')
-rw-r--r--kbx/keyboxd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kbx/keyboxd.c b/kbx/keyboxd.c
index 5acac97a5..753a2601a 100644
--- a/kbx/keyboxd.c
+++ b/kbx/keyboxd.c
@@ -1178,7 +1178,7 @@ create_public_keys_directory (const char *home)
struct stat statbuf;
fname = make_filename (home, GNUPG_PUBLIC_KEYS_DIR, NULL);
- if (stat (fname, &statbuf) && errno == ENOENT)
+ if (gnupg_stat (fname, &statbuf) && errno == ENOENT)
{
if (gnupg_mkdir (fname, "-rwxr-x"))
log_error (_("can't create directory '%s': %s\n"),
@@ -1207,7 +1207,7 @@ create_directories (void)
char *home;
home = make_filename (gnupg_homedir (), NULL);
- if (stat (home, &statbuf))
+ if (gnupg_stat (home, &statbuf))
{
if (errno == ENOENT)
{
@@ -1273,7 +1273,7 @@ handle_tick (void)
/* Check whether the homedir is still available. */
if (!shutdown_pending
&& (!have_homedir_inotify || !reliable_homedir_inotify)
- && stat (gnupg_homedir (), &statbuf) && errno == ENOENT)
+ && gnupg_stat (gnupg_homedir (), &statbuf) && errno == ENOENT)
{
shutdown_pending = 1;
log_info ("homedir has been removed - shutting down\n");