From 7af1f664411d337d865b2b3bd876163f2b0fbac4 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Thu, 15 Nov 2007 13:19:49 -0600 Subject: Make the download failure message more clear Use the word "disk" in place of the host name for local files Signed-off-by: Aaron Griffin --- lib/libalpm/server.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libalpm/server.c b/lib/libalpm/server.c index 9af16e05..8aa5a45b 100644 --- a/lib/libalpm/server.c +++ b/lib/libalpm/server.c @@ -238,8 +238,12 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath, dlf = downloadXGet(fileurl, &ust, (handle->nopassiveftp ? "" : "p")); if(downloadLastErrCode != 0 || dlf == NULL) { + const char *host = _("disk"); + if(strcmp(SCHEME_FILE, fileurl->scheme) != 0) { + host = fileurl->host; + } _alpm_log(PM_LOG_ERROR, _("failed retrieving file '%s' from %s : %s\n"), - fn, fileurl->host, downloadLastErrString); + fn, host, downloadLastErrString); if(localf != NULL) { fclose(localf); } -- cgit v1.2.3-24-g4f1b