mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bail out when opening a non-existing file as sqlite3.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17834 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
3f05768191
commit
575645f032
@ -153,6 +153,13 @@ gnc_dbi_sqlite3_session_begin( QofBackend *qbe, QofSession *session,
|
||||
|
||||
ENTER (" ");
|
||||
|
||||
if (!create_if_nonexistent
|
||||
&& !g_file_test(book_id, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_EXISTS)) {
|
||||
qof_backend_set_error(qbe, ERR_FILEIO_FILE_NOT_FOUND);
|
||||
LEAVE(" ");
|
||||
return;
|
||||
}
|
||||
|
||||
dirname = g_path_get_dirname( book_id );
|
||||
basename = g_path_get_basename( book_id );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user