aboutsummaryrefslogtreecommitdiffstats
path: root/agent
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2007-06-26 13:48:44 +0000
committerWerner Koch <[email protected]>2007-06-26 13:48:44 +0000
commita7fe86bc02f5b33cfc3c48a4d2e15d3ff94ffa16 (patch)
tree56d859ed11c7dc6faec9df7d6c55fbdf3b334b87 /agent
parentFixed a problem in estream-printf.c. (diff)
downloadgnupg-a7fe86bc02f5b33cfc3c48a4d2e15d3ff94ffa16.tar.gz
gnupg-a7fe86bc02f5b33cfc3c48a4d2e15d3ff94ffa16.zip
More W32 related changes
Diffstat (limited to 'agent')
-rw-r--r--agent/ChangeLog4
-rw-r--r--agent/gpg-agent.c12
2 files changed, 11 insertions, 5 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog
index 653bcd032..607a02282 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,3 +1,7 @@
+2007-06-26 Werner Koch <[email protected]>
+
+ * gpg-agent.c (create_directories) [W32]: Made it work.
+
2007-06-21 Werner Koch <[email protected]>
* agent.h (ctrl_t): Remove. It is now declared in ../common/util.h.
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 360870f27..b69142825 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -1351,10 +1351,7 @@ static void
create_directories (void)
{
struct stat statbuf;
-#ifdef HAVE_W32_SYSTEM
-#warning change it so that it works like in gpg.
-#endif
- const char *defhome = GNUPG_DEFAULT_HOMEDIR;
+ const char *defhome = standard_homedir ();
char *home;
home = make_filename (opt.homedir, NULL);
@@ -1362,11 +1359,16 @@ create_directories (void)
{
if (errno == ENOENT)
{
- if ( (*defhome == '~'
+ if (
+#ifdef HAVE_W32_SYSTEM
+ ( !compare_filenames (home, defhome) )
+#else
+ (*defhome == '~'
&& (strlen (home) >= strlen (defhome+1)
&& !strcmp (home + strlen(home)
- strlen (defhome+1), defhome+1)))
|| (*defhome != '~' && !strcmp (home, defhome) )
+#endif
)
{
#ifdef HAVE_W32_SYSTEM