From e0f11ece71f2cc29aa7ea62a21637cbb3877dbac Mon Sep 17 00:00:00 2001 From: Phil Longstaff Date: Sat, 11 Jul 2009 19:46:04 +0000 Subject: [PATCH] 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 --- src/engine/gnc-filepath-utils.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/engine/gnc-filepath-utils.c b/src/engine/gnc-filepath-utils.c index 3ad100addc..b1bdfbcd75 100644 --- a/src/engine/gnc-filepath-utils.c +++ b/src/engine/gnc-filepath-utils.c @@ -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 ... */