mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
common,w32: Fix early home dir creation.
* common/homedir.c (w32_try_mkdir): Remove. (standard_homedir): Call gnupg_mkdir directly. (_gnupg_socketdir_internal): Ditto. -- GnuPG-bug-id: 5895
This commit is contained in:
parent
caba9df726
commit
0f03bdcd2e
@ -113,24 +113,6 @@ static const char *w32_rootdir (void);
|
||||
|
||||
|
||||
|
||||
#ifdef HAVE_W32_SYSTEM
|
||||
static void
|
||||
w32_try_mkdir (const char *dir)
|
||||
{
|
||||
#ifdef HAVE_W32CE_SYSTEM
|
||||
wchar_t *wdir = utf8_to_wchar (dir);
|
||||
if (wdir)
|
||||
{
|
||||
CreateDirectory (wdir, NULL);
|
||||
xfree (wdir);
|
||||
}
|
||||
#else
|
||||
CreateDirectory (dir, NULL);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* This is a helper function to load and call a Windows function from
|
||||
* either of one DLLs. On success an UTF-8 file name is returned.
|
||||
* ERRNO is _not_ set on error. */
|
||||
@ -277,7 +259,7 @@ standard_homedir (void)
|
||||
|
||||
/* Try to create the directory if it does not yet exists. */
|
||||
if (gnupg_access (dir, F_OK))
|
||||
w32_try_mkdir (dir);
|
||||
gnupg_mkdir (dir, "-rwx");
|
||||
}
|
||||
else
|
||||
dir = GNUPG_DEFAULT_HOMEDIR;
|
||||
@ -881,7 +863,7 @@ _gnupg_socketdir_internal (int skip_checks, unsigned *r_info)
|
||||
name = xstrconcat (path, "\\gnupg", NULL);
|
||||
xfree (path);
|
||||
if (gnupg_access (name, F_OK))
|
||||
w32_try_mkdir (name);
|
||||
gnupg_mkdir (name, "-rwx");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user