diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-04 23:41:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-04 23:41:36 +0300 |
commit | 35742eeead80cd713e5b418b9f701afe5edccee1 (patch) | |
tree | c83bfbe35675e52e5b51711fe45b034a4152dfa1 /src/gui/windows/updaterwindow.cpp | |
parent | db821a964c9a7f96222b00e6b41f91ba3384e29a (diff) | |
download | mv-35742eeead80cd713e5b418b9f701afe5edccee1.tar.gz mv-35742eeead80cd713e5b418b9f701afe5edccee1.tar.bz2 mv-35742eeead80cd713e5b418b9f701afe5edccee1.tar.xz mv-35742eeead80cd713e5b418b9f701afe5edccee1.zip |
Fix possible update errors with empty update server.
Diffstat (limited to 'src/gui/windows/updaterwindow.cpp')
-rw-r--r-- | src/gui/windows/updaterwindow.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp index 752aa21e6..5dc0a7708 100644 --- a/src/gui/windows/updaterwindow.cpp +++ b/src/gui/windows/updaterwindow.cpp @@ -208,7 +208,8 @@ UpdaterWindow::UpdaterWindow(const std::string &restrict updateHost, mDownloadComplete(true), mUserCancel(false), mLoadUpdates(applyUpdates), - mValidateXml(false) + mValidateXml(false), + mSkipPatches(false) { setWindowName("UpdaterWindow"); setResizable(true); @@ -237,6 +238,14 @@ UpdaterWindow::UpdaterWindow(const std::string &restrict updateHost, addKeyListener(this); + if (mUpdateHost.empty()) + { + const std::vector<std::string> &mirrors = settings.updateMirrors; + if (mirrors.begin() != mirrors.end()) + mUpdateHost = *mirrors.begin(); + mSkipPatches = true; + } + loadWindowState(); } @@ -934,7 +943,7 @@ void UpdaterWindow::logic() } else { - if (!mUpdateHost.empty()) + if (!mSkipPatches) { // Download of updates completed mCurrentFile = "latest.txt"; |