gnucash unstable: Use file:/// when constructing a tempdir uri on Windows.
John Ralls
jralls at code.gnucash.org
Mon Oct 16 17:27:43 EDT 2017
Updated via https://github.com/Gnucash/gnucash/commit/25e3b22a (commit)
from https://github.com/Gnucash/gnucash/commit/99a28888 (commit)
commit 25e3b22a4a5c579c3add22e7a8d8d686a80293e0
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Oct 16 14:27:15 2017 -0700
Use file:/// when constructing a tempdir uri on Windows.
g_get_temp_dir doesn't provide the leading /.
diff --git a/gnucash/html/gnc-html-webkit1.c b/gnucash/html/gnc-html-webkit1.c
index 565d647..0bf2186 100644
--- a/gnucash/html/gnc-html-webkit1.c
+++ b/gnucash/html/gnc-html-webkit1.c
@@ -797,7 +797,11 @@ impl_webkit_show_data( GncHtml* self, const gchar* data, int datalen )
fd = g_mkstemp( filename );
impl_webkit_export_to_file( self, filename );
close( fd );
+#ifdef G_OS_WIN32
+ uri = g_strdup_printf( "file:///%s", filename );
+#else
uri = g_strdup_printf( "file://%s", filename );
+#endif
g_free(filename);
DEBUG("Loading uri '%s'", uri);
webkit_web_view_load_uri( priv->web_view, uri );
Summary of changes:
gnucash/html/gnc-html-webkit1.c | 4 ++++
1 file changed, 4 insertions(+)
More information about the gnucash-changes
mailing list