ConfigWizard & updating: Fixes & cleanups

This commit is contained in:
Vojtech Kral 2018-04-17 11:54:59 +02:00
parent b506aa11fa
commit 6286c9ee7c
5 changed files with 33 additions and 21 deletions

View file

@ -9,6 +9,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/log/trivial.hpp>
#include <wx/app.h>
#include <wx/event.h>
@ -114,8 +115,6 @@ bool PresetUpdater::priv::get_file(const std::string &url, const fs::path &targe
{
std::cerr << "get_file(): " << url << " -> " << target_path << std::endl;
// TODO: Proper caching
bool res = false;
fs::path tmp_path = target_path;
tmp_path += TMP_EXTENSION;
@ -251,7 +250,8 @@ Updates PresetUpdater::priv::config_update() const
const auto ver_current = idx.find(vp.config_version);
if (ver_current == idx.end()) {
// TODO: throw / ignore ?
BOOST_LOG_TRIVIAL(warning) << boost::format("Preset bundle (`%1%`) version not found in index: %2%") % idx.vendor() % vp.config_version.to_string();
continue;
}
const auto recommended = idx.recommended();