From 9b67c5aeeca43e62d0cd17bd7f369d2d59d126d4 Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Sun, 7 Mar 2021 16:27:16 -0600 Subject: [PATCH] Bug 2688 - Bad saves with Unicode project filenames --- src/DBConnection.cpp | 4 ++-- src/DBConnection.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DBConnection.cpp b/src/DBConnection.cpp index 9155bcb89..8e4e9ff0d 100644 --- a/src/DBConnection.cpp +++ b/src/DBConnection.cpp @@ -82,12 +82,12 @@ void DBConnection::SetDBError( printf(" Lib error: %s", mpErrors->mLibraryError.Debug().mb_str().data()); } -bool DBConnection::Open(const char *fileName) +bool DBConnection::Open(const FilePath fileName) { wxASSERT(mDB == nullptr); int rc; - rc = sqlite3_open(fileName, &mDB); + rc = sqlite3_open(fileName.ToUTF8(), &mDB); if (rc != SQLITE_OK) { sqlite3_close(mDB); diff --git a/src/DBConnection.h b/src/DBConnection.h index 895904ef5..7a37fdf7a 100644 --- a/src/DBConnection.h +++ b/src/DBConnection.h @@ -46,7 +46,7 @@ public: CheckpointFailureCallback callback); ~DBConnection(); - bool Open(const char *fileName); + bool Open(const FilePath fileName); bool Close(); //! throw and show appropriate message box