Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cdoc/CDoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ getVersion()
class ConsoleLogger : public Logger
{
public:
virtual void logMessage(LogLevel level, std::string_view file, int line, std::string_view message) override
void logMessage(LogLevel level, std::string_view file, int line, std::string_view message) override
{
// We ignore by default the file name and line number, and call LogMessage with the level and message.
std::ostream& ofs = (level == LEVEL_INFO) ? std::cout : std::cerr;
if (!file.empty()) {
ofs << std::filesystem::path(file).filename().string() << ':' << line << " " << message << '\n';
ofs << std::filesystem::path(encodeName(file)).filename().string() << ':' << line << " " << message << '\n';
} else {
ofs << message << '\n';
}
Expand Down
2 changes: 1 addition & 1 deletion cdoc/PKCS11Backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ struct libcdoc::PKCS11Backend::Private
bool load(const std::string &driver)
{
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
return (h = LoadLibraryW(std::filesystem::u8path(driver).c_str())) != 0;
return (h = LoadLibraryW(std::filesystem::path(encodeName(driver)).c_str())) != 0;
#else
return false;
#endif
Expand Down
2 changes: 1 addition & 1 deletion cdoc/Tar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ libcdoc::TarConsumer::open(const std::string& name, int64_t size)
paxData += toPaxRecord("path", name);
if(size > 07777777)
paxData += toPaxRecord("size", std::to_string(size));
std::filesystem::path path(name);
std::filesystem::path path(encodeName(name));
if (path.has_parent_path()) {
path = path.parent_path() / "PaxHeaders.X" / path.filename();
} else {
Expand Down
2 changes: 1 addition & 1 deletion cdoc/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ operator<<(std::ostream& escaped, urlEncode src)
continue;
}
// Keep alphanumeric and other accepted characters intact
if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~') {
if (isalnum(uint8_t(c)) || c == '-' || c == '_' || c == '.' || c == '~') {
escaped << c;
continue;
}
Expand Down
Loading