aboutsummaryrefslogtreecommitdiff
path: root/libsylph/prefs.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-10-06 08:09:26 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-10-06 08:09:26 +0000
commit69501c1a570997de5597a7d297cc8167b986812c (patch)
treeb87d0228b213d6b929cb8c483a998ef120463c14 /libsylph/prefs.c
parent8f444056099876aa36382824e637ad2084dc9c4c (diff)
win32: environmental variable fix.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@624 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/prefs.c')
-rw-r--r--libsylph/prefs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libsylph/prefs.c b/libsylph/prefs.c
index 190f5837..030cc746 100644
--- a/libsylph/prefs.c
+++ b/libsylph/prefs.c
@@ -425,6 +425,9 @@ void prefs_set_default(PrefParam *param)
gchar *tmp = NULL;
envstr = g_getenv(param[i].defval + 4);
+#ifdef G_OS_WIN32
+ tmp = g_strdup(envstr);
+#else
if (envstr) {
tmp = conv_codeset_strdup
(envstr,
@@ -435,10 +438,15 @@ void prefs_set_default(PrefParam *param)
tmp = g_strdup(envstr);
}
}
+#endif
*((gchar **)param[i].data) = tmp;
} else if (param[i].defval[0] == '~')
*((gchar **)param[i].data) =
+#ifdef G_OS_WIN32
+ g_strconcat(get_rc_dir(),
+#else
g_strconcat(get_home_dir(),
+#endif
param[i].defval + 1,
NULL);
else if (param[i].defval[0] != '\0')