Fossil

Diff
Login

Differences From Artifact [5fd27f14b1]:

To Artifact [6de368e4b5]:


709
710
711
712
713
714
715
716


717
718
719

720
721
722
723
724
725
726
727
728
** Open a database file.  Return a pointer to the new database
** connection.  An error results in process abort.
*/
LOCAL sqlite3 *db_open(const char *zDbName){
  int rc;
  sqlite3 *db;

#if defined(__CYGWIN__) || defined(_WIN32)


  zDbName = fossil_utf8_to_filename(zDbName);
#ifdef _WIN32
  /* Convert back to utf-8. TODO: SQLite should handle this */

  zDbName = fossil_filename_to_utf8(zDbName);
#endif
#endif
  if( g.fSqlTrace ) fossil_trace("-- sqlite3_open: [%s]\n", zDbName);
  rc = sqlite3_open_v2(
       zDbName, &db,
       SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
       g.zVfsName
  );







|
>
>

|
|
>

<







709
710
711
712
713
714
715
716
717
718
719
720
721
722
723

724
725
726
727
728
729
730
** Open a database file.  Return a pointer to the new database
** connection.  An error results in process abort.
*/
LOCAL sqlite3 *db_open(const char *zDbName){
  int rc;
  sqlite3 *db;

#if defined(__CYGWIN__)
  /* Necessary if we want Cygwin fossil to recognize win32 file
   * paths, as SQLite doesn't handle that (yet) */
  zDbName = fossil_utf8_to_filename(zDbName);
#elif defined(_WIN32)
  /* Only necessary when SQLite doesn't handle Extended paths. */
  zDbName = fossil_utf8_to_filename(zDbName);
  zDbName = fossil_filename_to_utf8(zDbName);

#endif
  if( g.fSqlTrace ) fossil_trace("-- sqlite3_open: [%s]\n", zDbName);
  rc = sqlite3_open_v2(
       zDbName, &db,
       SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
       g.zVfsName
  );