Updating: Index installation

Prevents cancelled updates from popping up repeatedly
on each application startup
This commit is contained in:
Vojtech Kral 2019-06-03 11:31:32 +02:00
parent fe395546f0
commit 503212181c
5 changed files with 65 additions and 37 deletions

View file

@ -192,6 +192,7 @@ size_t Index::load(const boost::filesystem::path &path)
{
m_configs.clear();
m_vendor = path.stem().string();
m_path = path;
boost::nowide::ifstream ifs(path.string());
std::string line;

View file

@ -72,6 +72,9 @@ public:
// if the index is valid.
const_iterator recommended() const;
// Returns the filesystem path from which this index has originally been loaded
const boost::filesystem::path& path() const { return m_path; }
// Load all vendor specific indices.
// Throws Slic3r::file_parser_error and the standard std file access exceptions.
static std::vector<Index> load_db();
@ -79,6 +82,7 @@ public:
private:
std::string m_vendor;
std::vector<Version> m_configs;
boost::filesystem::path m_path;
};
} // namespace Config