Overview
SHA1 Hash: | a25092b14ca85df3635bff9c54958ca91b17081c |
---|---|
Date: | 2009-08-15 21:38:24 |
User: | drh |
Comment: | Be sure to call mbcsToUtf8() when opening the global configuration database.
Ticket |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/db.c from [301ed91596] to [e7592f21b5].
@@ -629,10 +629,13 @@ int rc; const char *zVfs; sqlite3 *db; zVfs = getenv("FOSSIL_VFS"); +#ifdef __MINGW32__ + zDbName = mbcsToUtf8(zDbName); +#endif rc = sqlite3_open_v2( zDbName, &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, zVfs ); @@ -648,17 +651,17 @@ ** zDbName is the name of a database file. If no other database ** file is open, then open this one. If another database file is ** already open, then attach zDbName using the name zLabel. */ void db_open_or_attach(const char *zDbName, const char *zLabel){ -#ifdef __MINGW32__ - zDbName = mbcsToUtf8(zDbName); -#endif if( !g.db ){ g.db = openDatabase(zDbName); db_connection_init(); }else{ +#ifdef __MINGW32__ + zDbName = mbcsToUtf8(zDbName); +#endif db_multi_exec("ATTACH DATABASE %Q AS %s", zDbName, zLabel); } } /*