ENH: save hints.cereal into user directory insteadof cache

Change-Id: Ie44f18768e9908946f173bc668a46eb723f19745
This commit is contained in:
lane.wei 2023-01-01 14:26:13 +08:00 committed by Lane.Wei
parent f0908f2a63
commit 88ecb2aa2e
1 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ namespace {
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);
HintsCerealData cd{ ids };
try
@ -81,7 +81,7 @@ namespace {
}
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)) {
BOOST_LOG_TRIVIAL(warning) << "Failed to load to hints.cereal. File does not exists. " << path.string();
return;