Skip to content

Commit

Permalink
Use file:/// when constructing a tempdir uri on Windows.
Browse files Browse the repository at this point in the history
g_get_temp_dir doesn't provide the leading /.
  • Loading branch information
jralls committed Oct 16, 2017
1 parent 99a2888 commit 25e3b22
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gnucash/html/gnc-html-webkit1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 25e3b22

Please sign in to comment.