mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +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>
This commit is contained in:
parent
4dcef0e178
commit
18e5dd7b03
22 changed files with 82 additions and 33 deletions
|
@ -681,7 +681,7 @@ tdbio_set_dbname (ctrl_t ctrl, const char *new_dbname,
|
|||
* trustdb.gpg. This check is not required in theory, but it helps
|
||||
* in practice avoiding costly operations of preparing and taking
|
||||
* the lock. */
|
||||
if (!stat (fname, &statbuf) && statbuf.st_size > 0)
|
||||
if (!gnupg_stat (fname, &statbuf) && statbuf.st_size > 0)
|
||||
{
|
||||
/* OK, we have the valid trustdb.gpg already. */
|
||||
return 0;
|
||||
|
@ -722,7 +722,7 @@ tdbio_set_dbname (ctrl_t ctrl, const char *new_dbname,
|
|||
take_write_lock ();
|
||||
|
||||
if (gnupg_access (fname, R_OK)
|
||||
|| stat (fname, &statbuf)
|
||||
|| gnupg_stat (fname, &statbuf)
|
||||
|| statbuf.st_size == 0)
|
||||
{
|
||||
estream_t fp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue