I think this is the correct change, or maybe look for "file://" only.
I believe that the prefix for the file URL scheme is defined to be
"file://" not "file:". The prefix for http is "http://"
Mike
--On July 8, 2009 10:34:57 PM -0400 James Raehl <jimra...@raehls.us>
wrote:
Has anyone noticed that Windows (at least) Gnucash 2.3.1 hasn't been
generating transaction log files for XML databases? If you update a
data file DATA.XML, Gnucash 2.2.9 creates DATA.LOG and backs up to
DATA.XAC. 2.3.1 for Windows didn't create the log files.
I noticed a similar bug with the new "File" type for File > Open, per
http://svn.gnucash.org/trac/changeset/18178 -- an error message
appeared with the filename prefixed with // and the file was not
opened.
It appears that in src/engine/gnc-filepath-utils.c, the filename
input to routine xccResolveFilePath is of the form
"file://path/filename", where "file://" appears to be a filetype tag.
The routine deletes "file:" but leaves the "//". Gnucash then tries
to open "//path/filename". This also happens for xml:// files.
I changed the code in my source copy to check for "file://" and get
rid of the "//" too if found. Both bugs now seem to be solved.
The fixed fragment for "file://" is (a similar one for XML):
if (!g_ascii_strncasecmp(filefrag, "file:", 5))
{
LEAVE("filefrag is file uri");
if (!g_ascii_strncasecmp(filefrag, "file://", 7))
return g_strdup(filefrag + 7);
else
return g_strdup(filefrag + 5);
}
I don't know if my solution will cause other problems, since I don't
know the intricacies of the file tags. I don't know if there are
similar problems elsewhere that need to be fixed. Any suggestions
are appreciated.
Jim Raehl
_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel