mirror of https://github.com/oxen-io/lokinet
first pass fix wstring path conversions
This commit is contained in:
parent
1884d17e9d
commit
f62214cf8c
|
@ -216,7 +216,7 @@ main(int argc, char* argv[])
|
|||
{
|
||||
llarp::ensureConfig(
|
||||
llarp::GetDefaultDataDir(), llarp::GetDefaultConfigPath(), overwrite, opts.isRelay);
|
||||
conffname = llarp::GetDefaultConfigPath().c_str();
|
||||
conffname = llarp::GetDefaultConfigPath().string().c_str();
|
||||
}
|
||||
|
||||
if (genconfigOnly)
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace llarp
|
|||
m_lokidRPCPassword = config.lokid.lokidRPCPassword;
|
||||
|
||||
RouterContact rc;
|
||||
bool exists = rc.Read(m_rcPath.c_str());
|
||||
bool exists = rc.Read(m_rcPath.string().c_str());
|
||||
if (not exists and not genIfAbsent)
|
||||
{
|
||||
LogError("Could not read RouterContact at path ", m_rcPath);
|
||||
|
@ -186,7 +186,7 @@ namespace llarp
|
|||
bool
|
||||
KeyManager::backupKeyFilesByMoving() const
|
||||
{
|
||||
std::vector<std::string> files = {m_rcPath, m_idKeyPath, m_encKeyPath, m_transportKeyPath};
|
||||
std::vector<std::string> files = {m_rcPath.string(), m_idKeyPath.string(), m_encKeyPath.string(), m_transportKeyPath.string()};
|
||||
|
||||
for (auto& filepath : files)
|
||||
{
|
||||
|
@ -216,7 +216,7 @@ namespace llarp
|
|||
LogInfo("Generating new key", filepath);
|
||||
keygen(key);
|
||||
|
||||
if (!key.SaveToFile(filepath.c_str()))
|
||||
if (!key.SaveToFile(filepath.string().c_str()))
|
||||
{
|
||||
LogError("Failed to save new key");
|
||||
return false;
|
||||
|
@ -224,7 +224,7 @@ namespace llarp
|
|||
}
|
||||
|
||||
LogDebug("Loading key from file ", filepath);
|
||||
return key.LoadFromFile(filepath.c_str());
|
||||
return key.LoadFromFile(filepath.string().c_str());
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace llarp
|
|||
jobQueueSize = 1024;
|
||||
logic = std::make_shared<Logic>(jobQueueSize);
|
||||
|
||||
nodedb_dir = config->router.m_dataDir / nodedb_dirname;
|
||||
nodedb_dir = fs::path(config->router.m_dataDir / nodedb_dirname).string();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -473,7 +473,7 @@ namespace llarp
|
|||
}
|
||||
if (isListFile)
|
||||
{
|
||||
if (not BDecodeReadFile(router.c_str(), b_list))
|
||||
if (not BDecodeReadFile(router.string().c_str(), b_list))
|
||||
{
|
||||
throw std::runtime_error(stringify("failed to read bootstrap list file '", router, "'"));
|
||||
}
|
||||
|
@ -481,7 +481,7 @@ namespace llarp
|
|||
else
|
||||
{
|
||||
RouterContact rc;
|
||||
if (not rc.Read(router.c_str()))
|
||||
if (not rc.Read(router.string().c_str()))
|
||||
{
|
||||
throw std::runtime_error(
|
||||
stringify("failed to decode bootstrap RC, file='", router, "' rc=", rc));
|
||||
|
|
|
@ -9,6 +9,6 @@ namespace llarp
|
|||
{
|
||||
std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds> now{
|
||||
std::chrono::milliseconds{ts.now}};
|
||||
return date::operator<<(out, now) << " UTC [+" << ts.delta << "]";
|
||||
return date::operator<<(out, now) << " GMT [+" << ts.delta << "]";
|
||||
}
|
||||
} // namespace llarp
|
||||
|
|
Loading…
Reference in New Issue