[VFS] Fixed crash on filename extraction from path.
Names are in CP1252 which fails conversion to utf8.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user