mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
If session_begin contains initial 'xml://' or 'file://', remove it.
Fixes bug 585789 and 586121 git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18151 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
86ee8c9cdc
commit
1315842941
@ -201,6 +201,8 @@ gnc_file_be_get_file_lock (FileBackend *be)
|
||||
}
|
||||
|
||||
/* ================================================================= */
|
||||
#define XML_URI_PREFIX "xml://"
|
||||
#define FILE_URI_PREFIX "file://"
|
||||
|
||||
static void
|
||||
file_session_begin(QofBackend *be_start, QofSession *session,
|
||||
@ -208,10 +210,15 @@ file_session_begin(QofBackend *be_start, QofSession *session,
|
||||
gboolean ignore_lock, gboolean create_if_nonexistent)
|
||||
{
|
||||
FileBackend *be = (FileBackend*) be_start;
|
||||
gchar* resolved_path;
|
||||
|
||||
ENTER (" ");
|
||||
|
||||
/* Make sure the directory is there */
|
||||
if (g_str_has_prefix(book_id, XML_URI_PREFIX))
|
||||
book_id += strlen(XML_URI_PREFIX);
|
||||
if (g_str_has_prefix(book_id, FILE_URI_PREFIX))
|
||||
book_id += strlen(FILE_URI_PREFIX);
|
||||
be->fullpath = xaccResolveFilePath(book_id);
|
||||
if (NULL == be->fullpath)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user