diff options
author | Tor Lillqvist <tml@novell.com> | 2006-06-15 22:28:48 +0800 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2006-06-15 22:28:48 +0800 |
commit | a7426478fa6b489286552884eee1a270f529da42 (patch) | |
tree | 61cfeb60a4efcb80b272f6ebd5a7c643dc33ece2 /smime | |
parent | 977bf8afb9348dfd57cf622969c1f69d7ac877f8 (diff) | |
download | gsoc2013-evolution-a7426478fa6b489286552884eee1a270f529da42.tar.gz gsoc2013-evolution-a7426478fa6b489286552884eee1a270f529da42.tar.zst gsoc2013-evolution-a7426478fa6b489286552884eee1a270f529da42.zip |
On Win32, NSS wants filenames in system codepage, so convert UTF-8
2006-06-15 Tor Lillqvist <tml@novell.com>
* 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
Diffstat (limited to 'smime')
-rw-r--r-- | smime/ChangeLog | 5 | ||||
-rw-r--r-- | smime/lib/e-cert-db.c | 14 |
2 files changed, 18 insertions, 1 deletions
diff --git a/smime/ChangeLog b/smime/ChangeLog index a501fcd8c7..ebb0e67a6a 100644 --- a/smime/ChangeLog +++ b/smime/ChangeLog @@ -1,3 +1,8 @@ +2006-06-15 Tor Lillqvist <tml@novell.com> + + * lib/e-cert-db.c (initialize_nss): On Win32, NSS wants filenames + in system codepage, so convert UTF-8 filename to system codepage. + 2006-01-30 Tor Lillqvist <tml@novell.com> * lib/e-cert-db.c (install_loadable_roots): On Win32, don't bother 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)); |