ENH: save hints.cereal into user directory insteadof cache
Change-Id: Ie44f18768e9908946f173bc668a46eb723f19745
This commit is contained in:
parent
f0908f2a63
commit
88ecb2aa2e
|
@ -67,7 +67,7 @@ namespace {
|
||||||
|
|
||||||
void write_used_binary(const std::vector<std::string>& ids)
|
void write_used_binary(const std::vector<std::string>& ids)
|
||||||
{
|
{
|
||||||
boost::nowide::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal").string(), std::ios::binary);
|
boost::nowide::ofstream file((boost::filesystem::path(data_dir()) / "user" / "hints.cereal").string(), std::ios::binary);
|
||||||
cereal::BinaryOutputArchive archive(file);
|
cereal::BinaryOutputArchive archive(file);
|
||||||
HintsCerealData cd{ ids };
|
HintsCerealData cd{ ids };
|
||||||
try
|
try
|
||||||
|
@ -81,7 +81,7 @@ namespace {
|
||||||
}
|
}
|
||||||
void read_used_binary(std::vector<std::string>& ids)
|
void read_used_binary(std::vector<std::string>& ids)
|
||||||
{
|
{
|
||||||
boost::filesystem::path path(boost::filesystem::path(data_dir()) / "cache" / "hints.cereal");
|
boost::filesystem::path path(boost::filesystem::path(data_dir()) / "user" / "hints.cereal");
|
||||||
if (!boost::filesystem::exists(path)) {
|
if (!boost::filesystem::exists(path)) {
|
||||||
BOOST_LOG_TRIVIAL(warning) << "Failed to load to hints.cereal. File does not exists. " << path.string();
|
BOOST_LOG_TRIVIAL(warning) << "Failed to load to hints.cereal. File does not exists. " << path.string();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue