0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 11:18:51 +02:00

ircd: Employ path_string() at various callsites.

This commit is contained in:
Jason Volk 2019-02-07 20:56:48 -08:00
parent e666f72b74
commit 72a3ff2856
3 changed files with 7 additions and 32 deletions

View file

@ -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>

View file

@ -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

View file

@ -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))