@@ -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 :
0 commit comments