Ensure utf-8 to be used as path encoding
This commit is contained in:
parent
f1053aa31b
commit
59e939e907
1 changed files with 2 additions and 2 deletions
|
|
@ -27,12 +27,12 @@ fs::path FileTrie::operator[](size_t index) const
|
||||||
fs::path FileTrie::pathFromEntry(size_t index) const
|
fs::path FileTrie::pathFromEntry(size_t index) const
|
||||||
{
|
{
|
||||||
const Entry* currentEntry = &entries_[index];
|
const Entry* currentEntry = &entries_[index];
|
||||||
fs::path path { currentEntry->name };
|
fs::path path = fs::u8path(currentEntry->name);
|
||||||
|
|
||||||
size_t currentIndex;
|
size_t currentIndex;
|
||||||
while ((currentIndex = currentEntry->parent) != npos) {
|
while ((currentIndex = currentEntry->parent) != npos) {
|
||||||
currentEntry = &entries_[currentIndex];
|
currentEntry = &entries_[currentIndex];
|
||||||
path = fs::path { currentEntry->name } / path;
|
path = fs::u8path(currentEntry->name) / path;
|
||||||
}
|
}
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue