mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-12-01 21:19:16 -06:00
Bug 789594 - Unable to overwrite sqlite3 database file
This commit is contained in:
parent
240c4bd2cf
commit
9ab06bc9b3
@ -403,13 +403,18 @@ GncDbiBackend<DbType::DBI_SQLITE>::session_begin(QofSession* session,
|
||||
return;
|
||||
}
|
||||
|
||||
if (create && !force && file_exists)
|
||||
if (create && file_exists)
|
||||
{
|
||||
set_error (ERR_BACKEND_STORE_EXISTS);
|
||||
auto msg = "Might clobber, no force";
|
||||
PWARN ("%s", msg);
|
||||
LEAVE("Error");
|
||||
return;
|
||||
if (!force)
|
||||
{
|
||||
set_error (ERR_BACKEND_STORE_EXISTS);
|
||||
auto msg = "Might clobber, no force";
|
||||
PWARN ("%s", msg);
|
||||
LEAVE("Error");
|
||||
return;
|
||||
}
|
||||
else
|
||||
g_unlink (filepath.c_str());
|
||||
}
|
||||
|
||||
connect(nullptr);
|
||||
|
Loading…
Reference in New Issue
Block a user