PATCH: (gda-dev2): deal with windows paths

Phil Longstaff plongstaff at rogers.com
Mon Jan 21 12:23:58 EST 2008


Nathan Buchanan wrote:
> 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.

Applied.

Phil



More information about the gnucash-devel mailing list