Skip to content

Commit 8007c74

Browse files
committed
Updating libloot to 0.28.2
TODO: Update core vcpkg repo
1 parent e9cbec7 commit 8007c74

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

src/lootthread.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ void LOOTWorker::getSettings(const fs::path& file)
263263

264264
auto path = gameTable["path"].value<std::string>();
265265
if (path) {
266-
newSettings.SetGamePath(std::filesystem::u8path(*path));
266+
newSettings.SetGamePath(std::filesystem::path(*path));
267267
}
268268

269269
auto localPath = gameTable["local_path"].value<std::string>();
@@ -272,7 +272,7 @@ void LOOTWorker::getSettings(const fs::path& file)
272272
throw std::runtime_error(
273273
"Game settings have local_path and local_folder set, use only one.");
274274
} else if (localPath) {
275-
newSettings.SetGameLocalPath(std::filesystem::u8path(*localPath));
275+
newSettings.SetGameLocalPath(std::filesystem::path(*localPath));
276276
} else if (localFolder) {
277277
newSettings.SetGameLocalFolder(*localFolder);
278278
}
@@ -301,7 +301,7 @@ std::optional<std::string> LOOTWorker::GetLocalFolder(const toml::table& table)
301301
}
302302

303303
if (localPath.has_value()) {
304-
return std::filesystem::u8path(*localPath).filename().string();
304+
return std::filesystem::path(*localPath).filename().string();
305305
}
306306

307307
return std::nullopt;
@@ -312,7 +312,7 @@ bool LOOTWorker::IsNehrim(const toml::table& table)
312312
const auto installPath = table["path"].value<std::string>();
313313

314314
if (installPath.has_value() && !installPath.value().empty()) {
315-
const auto path = std::filesystem::u8path(installPath.value());
315+
const auto path = std::filesystem::path(installPath.value());
316316
if (std::filesystem::exists(path)) {
317317
return std::filesystem::exists(path / "NehrimLauncher.exe");
318318
}
@@ -344,7 +344,7 @@ bool LOOTWorker::IsEnderal(const toml::table& table,
344344
const auto installPath = table["path"].value<std::string>();
345345

346346
if (installPath.has_value() && !installPath.value().empty()) {
347-
const auto path = std::filesystem::u8path(installPath.value());
347+
const auto path = std::filesystem::path(installPath.value());
348348
if (std::filesystem::exists(path)) {
349349
return std::filesystem::exists(path / "Enderal Launcher.exe");
350350
}
@@ -418,9 +418,9 @@ bool LOOTWorker::isLocalPath(const std::string& location, const std::string& fil
418418
// Could be a local path. Only return true if it points to a non-bare
419419
// Git repository that currently has the given branch checked out and
420420
// the given filename exists in the repo root.
421-
auto locationPath = std::filesystem::u8path(location);
421+
auto locationPath = std::filesystem::path(location);
422422

423-
auto filePath = locationPath / std::filesystem::u8path(filename);
423+
auto filePath = locationPath / std::filesystem::path(filename);
424424

425425
if (!std::filesystem::is_regular_file(filePath)) {
426426
return false;
@@ -478,7 +478,7 @@ LOOTWorker::migrateMasterlistRepoSettings(loot::GameId GameId, std::string url,
478478

479479
auto filename = "masterlist.yaml";
480480
if (isLocalPath(url, filename)) {
481-
auto localRepoPath = std::filesystem::u8path(url);
481+
auto localRepoPath = std::filesystem::path(url);
482482
if (!isBranchCheckedOut(localRepoPath, branch)) {
483483
log(loot::LogLevel::warning,
484484
"The URL " + url +
@@ -705,7 +705,7 @@ int LOOTWorker::run()
705705
auto lootGamePath = gamePath();
706706
if (!fs::is_directory(lootGamePath)) {
707707
if (fs::exists(lootGamePath)) {
708-
throw loot::FileAccessError(
708+
throw std::runtime_error(
709709
"Could not create LOOT folder for game, the path exists but is not "
710710
"a directory");
711711
}
@@ -1107,8 +1107,7 @@ lootcli::LogLevels fromLootLogLevel(loot::LogLevel level)
11071107
case L::warning:
11081108
return LC::Warning;
11091109

1110-
case L::error: // fall-through
1111-
case L::fatal:
1110+
case L::error:
11121111
return LC::Error;
11131112

11141113
default:

vcpkg.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010
"default-registry": {
1111
"kind": "git",
1212
"repository": "https://github.com/Microsoft/vcpkg",
13-
"baseline": "294f76666c3000630d828703e675814c05a4fd43"
13+
"baseline": "74e6536215718009aae747d86d84b78376bf9e09"
1414
},
1515
"registries": [
1616
{
1717
"kind": "git",
1818
"repository": "https://github.com/Microsoft/vcpkg",
19-
"baseline": "294f76666c3000630d828703e675814c05a4fd43",
19+
"baseline": "74e6536215718009aae747d86d84b78376bf9e09",
2020
"packages": ["boost*", "boost-*"]
2121
},
2222
{
2323
"kind": "git",
24-
"repository": "https://github.com/ModOrganizer2/vcpkg-registry",
24+
"repository": "https://github.com/Silarn/vcpkg-registry",
2525
"baseline": "8beb2e0efa9c17dd6d17bb05288dd1e40727f673",
2626
"packages": ["libloot"]
2727
}

0 commit comments

Comments
 (0)