r18199 - gnucash/trunk/src/engine - Patch by Jim Raehl
Phil Longstaff
plongstaff at code.gnucash.org
Sat Jul 11 15:46:04 EDT 2009
Author: plongstaff
Date: 2009-07-11 15:46:04 -0400 (Sat, 11 Jul 2009)
New Revision: 18199
Trac: http://svn.gnucash.org/trac/changeset/18199
Modified:
gnucash/trunk/src/engine/gnc-filepath-utils.c
Log:
Patch by Jim Raehl
Fix bug 587853/585939. When parsing file: or xml: uri, handle file: and file://, xml: and xml://
Modified: gnucash/trunk/src/engine/gnc-filepath-utils.c
===================================================================
--- gnucash/trunk/src/engine/gnc-filepath-utils.c 2009-07-11 19:09:53 UTC (rev 18198)
+++ gnucash/trunk/src/engine/gnc-filepath-utils.c 2009-07-11 19:46:04 UTC (rev 18199)
@@ -203,11 +203,17 @@
if (!g_ascii_strncasecmp(filefrag, "file:", 5))
{
LEAVE("filefrag is file uri");
- return g_strdup(filefrag + 5);
+ if (!g_ascii_strncasecmp(filefrag, "file://", 7))
+ return g_strdup(filefrag + 7);
+ else
+ return g_strdup(filefrag + 5);
}
if( g_ascii_strncasecmp( filefrag, "xml:", 4 ) == 0 ) {
LEAVE( "filefrag is xml file uri" );
- return g_strdup( filefrag + 4);
+ if( g_ascii_strncasecmp( filefrag, "xml://", 6 ) == 0 )
+ return g_strdup( filefrag + 6);
+ else
+ return g_strdup( filefrag + 4);
}
/* get conservative on the length so that sprintf(getpid()) works ... */
More information about the gnucash-changes
mailing list