From e19d1f23406cc9d4eb426a27a5b8fa358c629f3c Mon Sep 17 00:00:00 2001 From: James Crook Date: Sat, 27 Mar 2021 17:54:14 +0000 Subject: [PATCH] Bug 2720 - Residual Handling of failed to open. Now if we fail, we abandon that connection, rather than plough on. --- src/ProjectFileIO.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ProjectFileIO.cpp b/src/ProjectFileIO.cpp index 034267406..c6b3d6912 100644 --- a/src/ProjectFileIO.cpp +++ b/src/ProjectFileIO.cpp @@ -1800,7 +1800,8 @@ bool ProjectFileIO::LoadProject(const FilePath &fileName, bool ignoreAutosave) ->GetActiveBlockIDs(); if (blockids.size() > 0) { - if (!DeleteBlocks(blockids, true)) + success = DeleteBlocks(blockids, true); + if (!success) { return false; } @@ -1823,7 +1824,8 @@ bool ProjectFileIO::LoadProject(const FilePath &fileName, bool ignoreAutosave) // we use that knowledge to determine if this file is an unsaved/temporary // file or a permanent project file wxString result; - if (!GetValue("SELECT Count(*) FROM project;", result)) + success = GetValue("SELECT Count(*) FROM project;", result); + if (!success) { return false; }