From 25bed1bb7f7dbfa3caa0f239c63dbabd3b0bd50d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 3 May 2014 20:16:10 +0300 Subject: Fix downloading updates from mirrors. --- src/gui/windows/updaterwindow.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/gui/windows') diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp index 37bbabda3..842176793 100644 --- a/src/gui/windows/updaterwindow.cpp +++ b/src/gui/windows/updaterwindow.cpp @@ -533,16 +533,20 @@ void UpdaterWindow::download() mDownload = new Net::Download(this, "http://manaplus.org/update/" + mCurrentFile, &updateProgress, true, false); + mDownload->addMirror("http://www.manaplus.org/update/" + mCurrentFile); } else { mDownload = new Net::Download(this, std::string(mUpdateHost).append( "/").append(mCurrentFile), &updateProgress, false, false); - } - const std::vector &mirrors = client->getMirrors(); - FOR_EACH (std::vector::const_iterator, it, mirrors) - mDownload->addMirror(*it); + const std::vector &mirrors = client->getMirrors(); + FOR_EACH (std::vector::const_iterator, it, mirrors) + { + mDownload->addMirror(std::string(*it).append( + "/").append(mCurrentFile)); + } + } if (mStoreInMemory) { -- cgit v1.2.3-70-g09d2