diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2014-01-02 18:50:59 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2014-01-02 18:50:59 +0000 |
commit | 9bd355e30c1f6aa57d42fe4f2fa6e9f521f002a4 (patch) | |
tree | 8c8bac104f0a5c79c7db157a50970af92ccb4369 /amiga/download.c | |
parent | c200eabf07482393e951bbe02badc7e9b54d734a (diff) | |
download | netsurf-9bd355e30c1f6aa57d42fe4f2fa6e9f521f002a4.tar.gz netsurf-9bd355e30c1f6aa57d42fe4f2fa6e9f521f002a4.tar.bz2 |
Convert download filename to local charset
Diffstat (limited to 'amiga/download.c')
-rw-r--r-- | amiga/download.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/amiga/download.c b/amiga/download.c index 52baedb24..d33b723d1 100644 --- a/amiga/download.c +++ b/amiga/download.c @@ -92,6 +92,7 @@ struct gui_download_window *gui_download_window_create(download_context *ctx, const char *mime_type = download_context_get_mime_type(ctx); unsigned long total_size = download_context_get_total_length(ctx); struct gui_download_window *dw; + char *dl_filename = ami_utf8_easy(download_context_get_filename(ctx)); APTR va[3]; dw = AllocVecTags(sizeof(struct gui_download_window), AVT_ClearWithValue, 0, TAG_DONE); @@ -107,9 +108,9 @@ struct gui_download_window *gui_download_window_create(download_context *ctx, if(AslRequestTags(savereq, ASLFR_Window, gui->shared->win, ASLFR_SleepWindow, TRUE, - ASLFR_TitleText,messages_get("NetSurf"), - ASLFR_Screen,scrn, - ASLFR_InitialFile, download_context_get_filename(ctx), + ASLFR_TitleText, messages_get("NetSurf"), + ASLFR_Screen, scrn, + ASLFR_InitialFile, dl_filename, TAG_DONE)) { strlcpy(dw->fname, savereq->fr_Drawer, 1024); @@ -127,6 +128,7 @@ struct gui_download_window *gui_download_window_create(download_context *ctx, } } + if(dl_filename) ami_utf8_free(dl_filename); dw->size = total_size; dw->downloaded = 0; if(gui) dw->bw = gui->shared->bw; |