Fix html temp-file URI.

The file path must start with a / anyway so we were getting URIs that
looked like "file:////foo/bar".
This commit is contained in:
John Ralls 2017-10-13 14:30:46 -07:00
parent 789a28dd5b
commit 97b09b5df5
2 changed files with 2 additions and 2 deletions

View File

@ -764,7 +764,7 @@ impl_webkit_show_data( GncHtml* self, const gchar* data, int datalen )
fd = g_mkstemp( filename );
impl_webkit_export_to_file( self, filename );
close( fd );
uri = g_strdup_printf( "file:///%s", filename );
uri = g_strdup_printf( "file://%s", filename );
g_free(filename);
DEBUG("Loading uri '%s'", uri);
webkit_web_view_load_uri( priv->web_view, uri );

View File

@ -742,7 +742,7 @@ impl_webkit_show_data( GncHtml* self, const gchar* data, int datalen )
fd = g_mkstemp( filename );
impl_webkit_export_to_file( self, filename );
close( fd );
uri = g_strdup_printf( "file:///%s", filename );
uri = g_strdup_printf( "file://%s", filename );
g_free(filename);
DEBUG("Loading uri '%s'", uri);
webkit_web_view_load_uri( priv->web_view, uri );