The suggested filename doesn't have to be the actual destination,
e.g. for 'vimprobable_download' downloads or when the user gives a
custom filename to :write.
There is a downside though: webkit_download_get_destination_uri()
returns an absolute path with 'file://' prefix, which is quite
verbose.
---
main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/main.c b/main.c
index 99ccad7..c377085 100644
--- a/main.c
+++ b/main.c
@@ -321,11 +321,11 @@ download_progress(WebKitDownload *d, GParamSpec *pspec) {
if (status != WEBKIT_DOWNLOAD_STATUS_STARTED && status != WEBKIT_DOWNLOAD_STATUS_CREATED) {
if (status != WEBKIT_DOWNLOAD_STATUS_FINISHED) {
a.i = Error;
- a.s = g_strdup_printf("Error while downloading %s", webkit_download_get_suggested_filename(d));
+ a.s = g_strdup_printf("Error while downloading %s", webkit_download_get_destination_uri(d));
echo(&a);
} else {
a.i = Info;
- a.s = g_strdup_printf("Download %s finished", webkit_download_get_suggested_filename(d));
+ a.s = g_strdup_printf("Download %s finished", webkit_download_get_destination_uri(d));
echo(&a);
}
g_free(a.s);
--
1.7.2.5
|