Ensure utf-8 to be used as path encoding

This commit is contained in:
Jean Pierre Cimalando 2020-10-30 08:11:17 +01:00
parent f1053aa31b
commit 59e939e907

View file

@ -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;