Patch by Jim Raehl

Fix bug 587853/585939.  When parsing file: or xml: uri, handle file: and file://, xml: and xml://


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18199 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Phil Longstaff 2009-07-11 19:46:04 +00:00
parent e719da4d81
commit e0f11ece71

View File

@ -203,11 +203,17 @@ xaccResolveFilePath (const char * filefrag)
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 ... */