diff options
| author | Werner Koch <[email protected]> | 2020-10-20 14:38:06 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2020-10-20 14:38:06 +0000 |
| commit | 18e5dd7b03ced51611c9ba1345cf498a0aaf14a6 (patch) | |
| tree | faeb1e27f9ffdb049f2e0dec728229d9fd7703b6 /g10/gpg.c | |
| parent | Replace most calls to open by a new wrapper. (diff) | |
| download | gnupg-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |
