commit 030abdef5658c5434c61963ff2339794ffc634ff
parent 73c04ee02510d30dae01c5a44a2fc6eda95bc986
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Thu, 18 Apr 2024 18:57:39 +0200
do not prematurely delete cache file so that other instances can use it too. Only delete once the DB became dirty
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/source/jucePluginLib/patchdb/db.cpp b/source/jucePluginLib/patchdb/db.cpp
@@ -1421,6 +1421,7 @@ namespace pluginLib::patchDB
bool DB::saveJson()
{
m_cacheDirty = true;
+ m_cacheFileName.deleteFile();
if (!m_jsonFileName.hasWriteAccess())
{
@@ -1689,8 +1690,6 @@ namespace pluginLib::patchDB
if(!synthLib::readFile(data, m_cacheFileName.getFullPathName().toStdString()))
return false;
- m_cacheFileName.deleteFile();
-
synthLib::BinaryStream inStream(data);
auto stream = inStream.tryReadChunk(chunks::g_patchManager);