mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd: Employ path_string() at various callsites.
This commit is contained in:
parent
e666f72b74
commit
72a3ff2856
3 changed files with 7 additions and 32 deletions
18
ircd/db.cc
18
ircd/db.cc
|
@ -246,11 +246,7 @@ ircd::db::direct_io_test_file_path()
|
|||
"SUPPORTS_DIRECT_IO"_sv
|
||||
};
|
||||
|
||||
return ircd::string(fs::PATH_MAX_LEN, []
|
||||
(const mutable_buffer &buf)
|
||||
{
|
||||
return fs::path(buf, fs::DB, test_file_name);
|
||||
});
|
||||
return fs::path_string(fs::DB, test_file_name);
|
||||
}
|
||||
|
||||
decltype(ircd::db::compressions)
|
||||
|
@ -3276,11 +3272,7 @@ ircd::db::database::sst::dump::dump(db::column column,
|
|||
fs::path(fs::DB), db::name(d), db::name(c)
|
||||
};
|
||||
|
||||
path = ircd::string(fs::PATH_MAX_LEN, [&path_parts]
|
||||
(const mutable_buffer &buf)
|
||||
{
|
||||
return fs::path(buf, path_parts);
|
||||
});
|
||||
path = fs::path_string(path_parts);
|
||||
}
|
||||
|
||||
rocksdb::Options opts(d.d->GetOptions(c));
|
||||
|
@ -7415,11 +7407,7 @@ ircd::db::path(const string_view &name,
|
|||
prefix, name, lex_cast(checkpoint)
|
||||
};
|
||||
|
||||
return ircd::string(fs::PATH_MAX_LEN, [&parts]
|
||||
(const mutable_buffer &buf)
|
||||
{
|
||||
return fs::path(buf, parts);
|
||||
});
|
||||
return fs::path_string(parts);
|
||||
}
|
||||
|
||||
std::pair<ircd::string_view, uint64_t>
|
||||
|
|
|
@ -140,11 +140,7 @@ catch(const std::exception &e)
|
|||
std::string
|
||||
ircd::log::file_path(const level &lev)
|
||||
{
|
||||
return string(fs::PATH_MAX_LEN, [&lev]
|
||||
(const mutable_buffer &buf)
|
||||
{
|
||||
return fs::path(buf, fs::LOG, reflect(lev));
|
||||
});
|
||||
return fs::path_string(fs::LOG, reflect(lev));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -77,26 +77,17 @@ init_my_tls_crt()
|
|||
|
||||
const std::string private_key_file
|
||||
{
|
||||
ircd::string(fs::PATH_MAX_LEN, [&](const mutable_buffer &buf)
|
||||
{
|
||||
return fs::path(buf, private_key_path_parts);
|
||||
})
|
||||
fs::path_string(private_key_path_parts)
|
||||
};
|
||||
|
||||
const std::string public_key_file
|
||||
{
|
||||
ircd::string(fs::PATH_MAX_LEN, [&](const mutable_buffer &buf)
|
||||
{
|
||||
return fs::path(buf, public_key_path_parts);
|
||||
})
|
||||
fs::path_string(public_key_path_parts)
|
||||
};
|
||||
|
||||
const std::string cert_file
|
||||
{
|
||||
ircd::string(fs::PATH_MAX_LEN, [&](const mutable_buffer &buf)
|
||||
{
|
||||
return fs::path(buf, certificate_path_parts);
|
||||
})
|
||||
fs::path_string(certificate_path_parts)
|
||||
};
|
||||
|
||||
if(!fs::exists(private_key_file))
|
||||
|
|
Loading…
Reference in a new issue