PATCH: (gda-dev2): deal with windows paths
Nathan Buchanan
nbinont at gmail.com
Sun Jan 20 00:24:59 EST 2008
Hi Phil!
Please find attached a patch that allows the gda backend to work with
windows paths of the form c:\path\to\file.db
Previously the code in gnc-backend-gda.c tried to eliminate file:// prefixes
by looking for a colon and then removing everything before the colon and the
two chars after the colon. Applying this strategy to the windows paths makes
the code happily find the colon, and then take out part of the path. It
would progress and eventually crash at line 159 when it assumes there are
two colons in the string and assigns to a null pointer.
This patch solves the problem by looking for more than simply a colon, but
actually looks for the "://" string before removing it.
Yours,
Nathan
--
<><><><><><><><><><><><><><><>
"Even if you are on the right track, you'll get run over if you just sit
there" - Will Rogers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gda_windows_paths.patch
Type: application/octet-stream
Size: 619 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20080120/145c3878/attachment.obj
More information about the gnucash-devel
mailing list