On Feb 28, 2010, at 5:20 AM, Christian Stimming wrote: > Dear John, > > Am Freitag, 26. Februar 2010 schrieb Phil Longstaff: >> On Sat, 2010-02-20 at 17:01 -0500, John Ralls wrote: >>> Author: jralls >>> Date: 2010-02-20 17:01:05 -0500 (Sat, 20 Feb 2010) >>> New Revision: 18699 >>> Trac: http://svn.gnucash.org/trac/changeset/18699 >>> Log: >>> Ensure that GNC_DOT_PATH and other gnc_dotgnucash_dir() logic is >>> used for all cases, remove hard-coded references to /usr/etc, >> >> I think this change introduced bug 610707: attempting SaveAs to XML file >> resulted in sqlite3 file. >> https://bugzilla.gnome.org/show_bug.cgi?id=610707 > > I think if bug#610707 is caused by your commit, it is most likely only due to > the following hunk: > >> @@ -338,15 +228,6 @@ xaccResolveURL (const char * pathfrag) >> } >> } >> g_list_free(list); >> - >> - /* "file:" and "xml:" are handled specially */ >> - if (!g_ascii_strncasecmp (pathfrag, "file:", 5)) { >> - return (xaccResolveFilePath (pathfrag)); >> - } >> - if (!g_ascii_strncasecmp (pathfrag, "xml:", 4)) { >> - return (g_strdup_printf( "xml:%s", xaccResolveFilePath (pathfrag)) ); >> - } >> - >> return (xaccResolveFilePath (pathfrag)); >> } > > By your r18699 commit, this "xml: is handled specially" was removed. Maybe > only this part needs to be added again and all is fine? >
Christian, Yes, Phil pointed that out a couple of days ago on the bug, and I made that change and tested it yesterday. I'll recommit with the fix today and close the bug. (I reverted 18699 while I worked on it.) Both of these functions (xaccResolveFilePath and xaccResolveURI) trouble me, though. For most cases, they're no-ops, because they just return their argument unchanged or not meaningfully changed -- and they do very little checking. I decided that it would be too off-topic to rewrite their calling functions, so I wrote comments explaining what they do -- which should discourage their use because it's generally nothing. Regards, John Ralls _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel