I checked WebKit's source code: webkit_download_get_destination_uri()
never returns NULL in lariza. It's because we set the destination URI in
the signal handler for the download request.
If g_filename_from_uri() really returned NULL for some reason, then it'd
be just plain wrong to announce the "suggested file name", because we
might be saving the download ... somewhere else. I doubt this function
ever returns NULL in lariza, though, but you never know.
So, now, the download manager will correctly show the URI if the
destination URI is "unknown".
/* This really should not happen because WebKit uses that URI to
* write to a file... */
fprintf(stderr, __NAME__": Could not construct file name from URI!\n");
- t = g_strdup_printf("%s (%.0f%%)",
- webkit_download_get_suggested_filename(download), p);
+ t = g_strdup_printf("%s (%.0f%%)", webkit_download_get_uri(download), p);
}
else
{