1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-23 07:58:05 +02:00

AUP3: Moving VFS setting to initer

This commit is contained in:
Leland Lucius 2020-07-07 15:47:23 -05:00
parent 875e8e0984
commit f7d9513f8d

View File

@ -119,6 +119,22 @@ public:
SQLiteIniter()
{
mRc = sqlite3_initialize();
#if !defined(__WXMSW__)
if (mRc == SQLITE_OK)
{
// Use the "unix-excl" VFS to make access to the DB exclusive. This gets
// rid of the "<dbname>-shm" shared memory file.
//
// Though it shouldn't, it doesn't matter if this fails.
auto vfs = sqlite3_vfs_find("unix-excl");
if (vfs)
{
sqlite3_vfs_register(vfs, 1);
}
}
#endif
}
~SQLiteIniter()
{
@ -214,16 +230,6 @@ void ProjectFileIO::Init( AudacityProject &project )
// This step can't happen in the ctor of ProjectFileIO because ctor of
// AudacityProject wasn't complete
mpProject = project.shared_from_this();
#if !defined(__WXMSW__)
// Use the "unix-excl" VFS to make access to the DB exclusive. This gets
// rid of the "<dbname>-shm" shared memory file.
auto vfs = sqlite3_vfs_find("unix-excl");
if (vfs)
{
sqlite3_vfs_register(vfs, 1);
}
#endif
}
ProjectFileIO::~ProjectFileIO()