mirror of https://github.com/kiwix/libkiwix.git
Correctly open the library path on windows.
We need to convert the path to wstring on Windows to handle directory with accented characters. Fix kiwix-desktop#269
This commit is contained in:
parent
7c7e351d34
commit
5540149e2b
|
@ -19,6 +19,8 @@
|
|||
|
||||
#include "manager.h"
|
||||
|
||||
#include "tools/pathTools.h"
|
||||
|
||||
#include <pugixml.hpp>
|
||||
|
||||
namespace kiwix
|
||||
|
@ -145,7 +147,12 @@ bool Manager::readFile(const std::string& nativePath,
|
|||
{
|
||||
bool retVal = true;
|
||||
pugi::xml_document doc;
|
||||
|
||||
#ifdef _WIN32
|
||||
pugi::xml_parse_result result = doc.load_file(Utf8ToWide(nativePath).c_str());
|
||||
#else
|
||||
pugi::xml_parse_result result = doc.load_file(nativePath.c_str());
|
||||
#endif
|
||||
|
||||
if (result) {
|
||||
this->parseXmlDom(doc, readOnly, UTF8Path);
|
||||
|
|
Loading…
Reference in New Issue