Index: security/manager/ssl/src/nsNSSComponent.cpp =================================================================== RCS file: /cvsroot/mozilla/security/manager/ssl/src/nsNSSComponent.cpp,v retrieving revision 1.165 diff -u -8 -r1.165 nsNSSComponent.cpp --- security/manager/ssl/src/nsNSSComponent.cpp 12 Apr 2008 04:47:24 -0000 1.165 +++ security/manager/ssl/src/nsNSSComponent.cpp 11 Jul 2008 10:16:06 -0000 @@ -114,16 +114,20 @@ #include "secmime.h" #include "ocsp.h" #include "cms.h" #include "nssckbi.h" #include "base64.h" #include "secerr.h" #include "sslerr.h" +#ifdef XP_WIN +#include "nsILocalFileWin.h" +#endif + extern "C" { #include "pkcs12.h" #include "p12plcy.h" } #ifdef PR_LOGGING PRLogModuleInfo* gPIPNSSLog = nsnull; #endif @@ -1511,17 +1515,25 @@ // On MachO, we need to access both directories, // and therefore need separate nsIFile instances. // Keep cfmSecurityPath instance, obtain new instance for MachO profilePath. rv = cfmSecurityPath->GetParent(getter_AddRefs(profilePath)); if (NS_FAILED(rv)) return rv; #endif + #if defined(XP_WIN) + // Native path will drop Unicode characters that cannot be mapped to system's + // codepage, using short (canonical) path as workaround. + nsCOMPtr profilePathWin(do_QueryInterface(profilePath, &rv)); + if (profilePathWin) + rv = profilePathWin->GetNativeCanonicalPath(profileStr); + #else rv = profilePath->GetNativePath(profileStr); + #endif if (NS_FAILED(rv)) return rv; #if defined(XP_MACOSX) // function may modify the parameters // ignore return code from conversion, we continue anyway TryCFM2MachOMigration(cfmSecurityPath, profilePath); #endif