Fix profile startup failure when non-ASCII characters are in the profile path name (bug 324311). Thanks to Nickolay Ponomarev <asqueella@gmail.com> for the patch; r=bryner, a181=bryner.

This commit is contained in:
dmose%mozilla.org 2006-03-06 05:40:32 +00:00
parent 189f26cded
commit 11b16050d0

View File

@ -97,11 +97,11 @@ mozStorageConnection::Initialize(nsIFile *aDatabaseFile)
mDatabaseFile = aDatabaseFile;
if (aDatabaseFile) {
nsCAutoString nativePath;
rv = aDatabaseFile->GetNativePath(nativePath);
nsAutoString path;
rv = aDatabaseFile->GetPath(path);
NS_ENSURE_SUCCESS(rv, rv);
srv = sqlite3_open (nativePath.get(), &mDBConn);
srv = sqlite3_open16 (path.get(), &mDBConn);
} else {
// in memory database requested, sqlite uses a magic file name
srv = sqlite3_open (":memory:", &mDBConn);