From a7426478fa6b489286552884eee1a270f529da42 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 15 Jun 2006 14:28:48 +0000 Subject: On Win32, NSS wants filenames in system codepage, so convert UTF-8 2006-06-15 Tor Lillqvist * lib/e-cert-db.c (initialize_nss): On Win32, NSS wants filenames in system codepage, so convert UTF-8 filename to system codepage. svn path=/trunk/; revision=32157 --- smime/lib/e-cert-db.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'smime/lib') diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c index de310ab4be..a735d57201 100644 --- a/smime/lib/e-cert-db.c +++ b/smime/lib/e-cert-db.c @@ -177,7 +177,19 @@ initialize_nss (void) char *evolution_dir_path; gboolean success; - evolution_dir_path = g_build_path ("/", g_get_home_dir (), ".evolution", NULL); + evolution_dir_path = g_build_filename (g_get_home_dir (), ".evolution", NULL); + +#ifdef G_OS_WIN32 + /* NSS wants filenames in system codepage */ + { + char *cp_path = g_win32_locale_filename_from_utf8 (evolution_dir_path); + + if (cp_path) { + g_free (evolution_dir_path); + evolution_dir_path = cp_path; + } + } +#endif /* we initialize NSS here to make sure it only happens once */ success = (SECSuccess == NSS_InitReadWrite (evolution_dir_path)); -- cgit v1.2.3