Skip to content

Commit

Permalink
fix: try handling localized error messages on Windows (fixes gh #241)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhx committed Nov 20, 2024
1 parent 81585ea commit 9bced66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/utility/filesystem_extractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ class filesystem_extractor_ final : public filesystem_extractor::impl {
try {
close();
} catch (std::exception const& e) {
LOG_ERROR << "close() failed in destructor: " << e.what();
LOG_ERROR << "close() failed in destructor: "
<< error_cp_to_utf8(e.what());
} catch (...) {
LOG_ERROR << "close() failed in destructor";
}
Expand Down
2 changes: 1 addition & 1 deletion src/writer/scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ scanner_<LoggerPolicy>::add_entry(std::filesystem::path const& name,
LOG_ERROR << fmt::format(
"invalid file name in \"{}\", storing as \"{}\": {}",
path_to_utf8_string_sanitized(name.parent_path()), pe->name(),
e.what());
error_cp_to_utf8(e.what()));

prog.errors++;

Expand Down

0 comments on commit 9bced66

Please sign in to comment.