ensure skiplist entry
This commit is contained in:
parent
7a7432f2b5
commit
6a69c81e79
@ -169,6 +169,7 @@ void NNTPServerHandler::ArticleObtained()
|
||||
{
|
||||
m_article->close();
|
||||
m_article = nullptr;
|
||||
m_store.EnsureSymlinks(m_articleName);
|
||||
QueueLine("239 " + m_articleName);
|
||||
std::cerr << "stored " << m_articleName << std::endl;
|
||||
}
|
||||
|
@ -80,7 +80,10 @@ bool ArticleStorage::LoadThread(Thread &thread, const std::string &rootmsgid) co
|
||||
void ArticleStorage::EnsureSymlinks(const std::string &msgid) const
|
||||
{
|
||||
std::string msgidhash = Blake2B_base32(msgid);
|
||||
skiplist_dir(posts_skiplist_dir, msgidhash);
|
||||
auto skip = skiplist_dir(skiplist_root(posts_skiplist_dir), msgidhash) / msgidhash;
|
||||
auto path = fs::path("..") / fs::path("..") / fs::path("..") / MessagePath(msgid);
|
||||
fs::create_symlink(path, skip);
|
||||
errno = 0;
|
||||
}
|
||||
|
||||
fs::path ArticleStorage::skiplist_root(const std::string &name) const { return basedir / name; }
|
||||
|
Reference in New Issue
Block a user