mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fixed debug logging always being disabled.
Also corrected path argument for generating default settings file.
This commit is contained in:
@@ -405,7 +405,7 @@ namespace loot {
|
||||
}
|
||||
|
||||
//Default settings file generation.
|
||||
void GenerateDefaultSettingsFile(const std::string& file) {
|
||||
void GenerateDefaultSettingsFile(const boost::filesystem::path& file) {
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << "Generating default settings file.";
|
||||
|
||||
@@ -431,8 +431,7 @@ namespace loot {
|
||||
yout.SetIndent(2);
|
||||
yout << root;
|
||||
|
||||
boost::filesystem::path p(file);
|
||||
loot::ofstream out(p);
|
||||
loot::ofstream out(file);
|
||||
out << yout.c_str();
|
||||
out.close();
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace loot {
|
||||
const bool masterlistUpdateEnabled);
|
||||
|
||||
//Default settings file generation.
|
||||
void GenerateDefaultSettingsFile(const std::string& file);
|
||||
void GenerateDefaultSettingsFile(const boost::filesystem::path& file);
|
||||
}
|
||||
|
||||
namespace YAML {
|
||||
|
||||
+2
-2
@@ -65,7 +65,7 @@ namespace loot {
|
||||
catch (fs::filesystem_error& /*e*/) {
|
||||
initError = "Error: Could not create local app data LOOT folder.";
|
||||
}
|
||||
GenerateDefaultSettingsFile(g_path_settings.string());
|
||||
GenerateDefaultSettingsFile(g_path_settings);
|
||||
}
|
||||
try {
|
||||
loot::ifstream in(g_path_settings);
|
||||
@@ -201,7 +201,7 @@ namespace loot {
|
||||
loot::Language lang(_settings["Language"].as<string>());
|
||||
CefString(&cef_settings.locale).FromString(lang.Locale());
|
||||
}
|
||||
if (!_settings["Verbosity"] || _settings["Debug Verbosity"].as<unsigned int>() == 0)
|
||||
if (!_settings["Debug Verbosity"] || _settings["Debug Verbosity"].as<unsigned int>() == 0)
|
||||
cef_settings.log_severity = LOGSEVERITY_DISABLE;
|
||||
|
||||
// Use cef_settings.resources_dir_path to specify Resources folder path.
|
||||
|
||||
Reference in New Issue
Block a user