[VFS] Fixed crash on filename extraction from path.

Names are in CP1252 which fails conversion to utf8.
This commit is contained in:
Gliniak
2024-08-31 18:15:13 +02:00
parent 59eed7818f
commit 02f5316562
18 changed files with 44 additions and 29 deletions

View File

@@ -17,8 +17,9 @@ namespace vfs {
XContentContainerEntry::XContentContainerEntry(Device* device, Entry* parent,
const std::string_view path,
const std::string_view name,
MultiFileHandles* files)
: Entry(device, parent, path),
: Entry(device, parent, path, name),
files_(files),
data_offset_(0),
data_size_(0),
@@ -30,8 +31,8 @@ std::unique_ptr<XContentContainerEntry> XContentContainerEntry::Create(
Device* device, Entry* parent, const std::string_view name,
MultiFileHandles* files) {
auto path = xe::utf8::join_guest_paths(parent->path(), name);
auto entry =
std::make_unique<XContentContainerEntry>(device, parent, path, files);
auto entry = std::make_unique<XContentContainerEntry>(device, parent, path,
name, files);
return std::move(entry);
}