aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-10-20 14:38:06 +0000
committerWerner Koch <[email protected]>2020-10-20 14:38:06 +0000
commit18e5dd7b03ced51611c9ba1345cf498a0aaf14a6 (patch)
treefaeb1e27f9ffdb049f2e0dec728229d9fd7703b6 /g10/gpg.c
parentReplace most calls to open by a new wrapper. (diff)
downloadgnupg-18e5dd7b03ced51611c9ba1345cf498a0aaf14a6.tar.gz
gnupg-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 <[email protected]>
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 1b1d18969..c5c6f87ad 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -1574,7 +1574,7 @@ check_permissions (const char *path, int item)
}
/* It's okay if the file or directory doesn't exist */
- if(stat(tmppath,&statbuf)!=0)
+ if (gnupg_stat (tmppath,&statbuf))
{
ret=0;
goto end;
@@ -1585,7 +1585,7 @@ check_permissions (const char *path, int item)
I'm stopping at one level down. */
dir=make_dirname(tmppath);
- if(stat(dir,&dirbuf)!=0 || !S_ISDIR(dirbuf.st_mode))
+ if (gnupg_stat (dir,&dirbuf) || !S_ISDIR (dirbuf.st_mode))
{
/* Weird error */
ret=1;