mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-24 19:43:33 +01:00
parent
c09a8f990c
commit
830bd8d449
@ -111,23 +111,28 @@ static void loadConfig()
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
auto pghs = Paragraphs::get_paragraphs(localappdata / "vcpkg" / "config").get_or_exit(VCPKG_LINE_INFO);
|
auto maybe_pghs = Paragraphs::get_paragraphs(localappdata / "vcpkg" / "config");
|
||||||
std::unordered_map<std::string, std::string> keys;
|
if (auto p_pghs = maybe_pghs.get())
|
||||||
if (pghs.size() > 0)
|
|
||||||
keys = pghs[0];
|
|
||||||
|
|
||||||
for (size_t x = 1; x < pghs.size(); ++x)
|
|
||||||
{
|
{
|
||||||
for (auto&& p : pghs[x])
|
const auto& pghs = *p_pghs;
|
||||||
keys.insert(p);
|
|
||||||
|
std::unordered_map<std::string, std::string> keys;
|
||||||
|
if (pghs.size() > 0)
|
||||||
|
keys = pghs[0];
|
||||||
|
|
||||||
|
for (size_t x = 1; x < pghs.size(); ++x)
|
||||||
|
{
|
||||||
|
for (auto&& p : pghs[x])
|
||||||
|
keys.insert(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
auto user_id = keys["User-Id"];
|
||||||
|
auto user_time = keys["User-Since"];
|
||||||
|
Checks::check_throw(VCPKG_LINE_INFO, !user_id.empty() && !user_time.empty(), ""); // Use as goto to the catch statement
|
||||||
|
|
||||||
|
SetUserInformation(user_id, user_time);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto user_id = keys["User-Id"];
|
|
||||||
auto user_time = keys["User-Since"];
|
|
||||||
Checks::check_throw(VCPKG_LINE_INFO, !user_id.empty() && !user_time.empty(), ""); // Use as goto to the catch statement
|
|
||||||
|
|
||||||
SetUserInformation(user_id, user_time);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user