Fix #8: The "webview" web browser, started with the parameter, address with the name of the download file, downloads the same file multiple times.

This commit is contained in:
leency 2025-02-25 15:51:03 +02:00
parent a576b68db3
commit 84aec355b8
2 changed files with 5 additions and 3 deletions

View File

@ -222,7 +222,7 @@ void main()
http.receive();
if (http_get_type==PAGE) {
CheckContentType();
CheckContentType();
prbar.max = http.content_length;
if (prbar.value != http.content_received) {
prbar.value = http.content_received;
@ -946,8 +946,10 @@ void CheckContentType()
StopLoading();
}
else if (content_type[0] == 'a') {
EventOpenDownloader(http.cur_url);
http_get_type = FILE;
StopLoading();
if (!canvas.bufw) OpenPage(DEFAULT_URL); //Fixed: Browser was launched with file param
EventOpenDownloader(http.cur_url);
}
else {
WB1.custom_encoding = -1;

View File

@ -1,5 +1,5 @@
enum {
PAGE=1, IMG
PAGE=1, IMG, FILE
};
struct _cache