1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

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>
Backported-from-master: 18e5dd7b03)
This commit is contained in:
Werner Koch 2020-10-20 16:38:06 +02:00
parent 86e52e3c33
commit 157030271f
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
20 changed files with 77 additions and 28 deletions

View file

@ -1501,7 +1501,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;
@ -1512,7 +1512,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;