mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Use same 'force' logic sequence for sqlite and other dbs
This commit is contained in:
@@ -405,7 +405,9 @@ GncDbiBackend<DbType::DBI_SQLITE>::session_begin(QofSession* session,
|
|||||||
|
|
||||||
if (create && file_exists)
|
if (create && file_exists)
|
||||||
{
|
{
|
||||||
if (!force)
|
if (force)
|
||||||
|
g_unlink (filepath.c_str());
|
||||||
|
else
|
||||||
{
|
{
|
||||||
set_error (ERR_BACKEND_STORE_EXISTS);
|
set_error (ERR_BACKEND_STORE_EXISTS);
|
||||||
auto msg = "Might clobber, no force";
|
auto msg = "Might clobber, no force";
|
||||||
@@ -413,8 +415,6 @@ GncDbiBackend<DbType::DBI_SQLITE>::session_begin(QofSession* session,
|
|||||||
LEAVE("Error");
|
LEAVE("Error");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
g_unlink (filepath.c_str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(nullptr);
|
connect(nullptr);
|
||||||
|
|||||||
Reference in New Issue
Block a user