[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] [PATCH 09/27] Change mfile->name to filename in Metalink modu
From: |
Matthew White |
Subject: |
[Bug-wget] [PATCH 09/27] Change mfile->name to filename in Metalink module's messages |
Date: |
Thu, 29 Sep 2016 06:02:49 +0200 |
* src/metalink.c (retrieve_from_metalink): Change mfile->name to
filename when referring to the downloaded file
The file name could have been changed by unique_create() (or by any
other mean) before downloading. Use the name of the downloaded file
(filename) when printing output which refer to it.
---
src/metalink.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/metalink.c b/src/metalink.c
index ee0ed08..8e074fe 100644
--- a/src/metalink.c
+++ b/src/metalink.c
@@ -325,7 +325,7 @@ retrieve_from_metalink (const metalink_t* metalink)
}
logprintf (LOG_VERBOSE, _("Computing checksum for %s\n"),
- quote (mfile->name));
+ quote (filename));
DEBUGP (("Declared hash: %s\n", mchksum->hash));
@@ -408,7 +408,7 @@ retrieve_from_metalink (const metalink_t* metalink)
{
logprintf (LOG_NOTQUIET,
_("Checksum mismatch for file %s.\n"),
- quote (mfile->name));
+ quote (filename));
}
/* Stop as soon as we checked the supported checksum. */
@@ -592,14 +592,14 @@ gpg_skip_verification:
if (retr_err != RETROK)
{
logprintf (LOG_VERBOSE, _("Failed to download %s. Skipping
resource.\n"),
- quote (mfile->name));
+ quote (filename ? filename : mfile->name));
}
else if (!hash_ok)
{
retr_err = METALINK_CHKSUM_ERROR;
logprintf (LOG_NOTQUIET,
_("File %s retrieved but checksum does not match. "
- "\n"), quote (mfile->name));
+ "\n"), quote (filename));
}
#ifdef HAVE_GPGME
/* Signature will be only validated if hash check was successful. */
@@ -608,7 +608,7 @@ gpg_skip_verification:
retr_err = METALINK_SIG_ERROR;
logprintf (LOG_NOTQUIET,
_("File %s retrieved but signature does not match. "
- "\n"), quote (mfile->name));
+ "\n"), quote (filename));
}
#endif
last_retr_err = retr_err == RETROK ? last_retr_err : retr_err;
--
2.7.3
- [Bug-wget] [PATCH v2 01/27] new Metalink functionalities, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 02/27] Fix: Change Metalink/XML v3 file name into test.metalink, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 01/27] Add two Metalink/XML tests, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 03/27] Use python .replace instead than re.sub in Metalink tests, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 04/27] Add metalink description, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 05/27] Bugfix: Fix NULL filename and output_stream in Metalink module, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 06/27] Bugfix: Keep the download progress when alternating metalink:url, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 07/27] Update Metalink/XML tests and add a new test for home paths, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 09/27] Change mfile->name to filename in Metalink module's messages,
Matthew White <=
- [Bug-wget] [PATCH 08/27] Add file size computation in Metalink module, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 10/27] Implement Metalink/XML --directory-prefix option in Metalink module, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 11/27] Enforce Metalink file name verification, strip directory if necessary, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 12/27] New document: Metalink/XML and Metalink/HTTP standard reference, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 14/27] New: Metalink file size mismatch returns error code METALINK_SIZE_ERROR, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 15/27] New test: Detect when there are no good Metalink url resources, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 16/27] Bugfix: Process Metalink/XML url strings containing white spaces and CRLF, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 17/27] Bugfix: Remove surrounding quotes from Metalink/HTTP key's value, Matthew White, 2016/09/29
- [Bug-wget] [PATCH 18/27] New test: Metalink shall not concatenate '/' to an empty directory prefix, Matthew White, 2016/09/29