mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-05 17:00:38 +08:00
Hints.cereal file existence check
This commit is contained in:
parent
e630332e24
commit
cd4155a890
@ -74,7 +74,12 @@ void write_used_binary(const std::vector<std::string>& ids)
|
|||||||
}
|
}
|
||||||
void read_used_binary(std::vector<std::string>& ids)
|
void read_used_binary(std::vector<std::string>& ids)
|
||||||
{
|
{
|
||||||
boost::filesystem::ifstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal"));
|
boost::filesystem::path path(boost::filesystem::path(data_dir()) / "cache" / "hints.cereal");
|
||||||
|
if (!boost::filesystem::exists(path)) {
|
||||||
|
BOOST_LOG_TRIVIAL(warning) << "Failed to load to hints.cereal. File does not exists. " << path.string();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
boost::filesystem::ifstream file(path);
|
||||||
cereal::BinaryInputArchive archive(file);
|
cereal::BinaryInputArchive archive(file);
|
||||||
HintsCerealData cd;
|
HintsCerealData cd;
|
||||||
try
|
try
|
||||||
|
Loading…
x
Reference in New Issue
Block a user