From bb6a72caea0c1700ce8d0deff641f3e9b5e84127 Mon Sep 17 00:00:00 2001 From: Filipe Brandenburger Date: Wed, 2 Mar 2011 10:57:44 +0100 Subject: [PATCH] Do not adjust the extension if the file ends in .htm. --- NEWS | 3 +++ src/ChangeLog | 5 +++++ src/http.c | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 5fe73d67..ff2ed06d 100644 --- a/NEWS +++ b/NEWS @@ -54,6 +54,9 @@ Please send GNU Wget bug reports to . ** Fix an infinite loop with the error ' has sprung into existence' on a network error and -nc is used. + +** Now --adjust-extension does not modify the file extension if the file ends + in .htm. * Changes in Wget 1.12 diff --git a/src/ChangeLog b/src/ChangeLog index b421f264..62302686 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-02 Tomasz Buchert (tiny change) + + * http.c (ensure_extension): Do not adjust the extension if the file + ends in .htm. + 2011-02-22 Gilles Carry * main.c (prompt_for_password): Use stderr instead of stdout diff --git a/src/http.c b/src/http.c index b4f1667b..d7e55ca8 100644 --- a/src/http.c +++ b/src/http.c @@ -3501,7 +3501,7 @@ ensure_extension (struct http_stat *hs, const char *ext, int *dt) if (len == 5) { strncpy (shortext, ext, len - 1); - shortext[len - 2] = '\0'; + shortext[len - 1] = '\0'; } if (last_period_in_local_filename == NULL -- 2.39.2