[VFS] Fixed crash on filename extraction from path.
Names are in CP1252 which fails conversion to utf8.
This commit is contained in:
@@ -16,10 +16,12 @@
|
||||
namespace xe {
|
||||
namespace vfs {
|
||||
|
||||
Entry::Entry(Device* device, Entry* parent, const std::string_view path)
|
||||
Entry::Entry(Device* device, Entry* parent, const std::string_view path,
|
||||
const std::string_view name)
|
||||
: device_(device),
|
||||
parent_(parent),
|
||||
path_(path),
|
||||
name_(name),
|
||||
attributes_(0),
|
||||
size_(0),
|
||||
allocation_size_(0),
|
||||
@@ -29,7 +31,6 @@ Entry::Entry(Device* device, Entry* parent, const std::string_view path)
|
||||
delete_on_close_(false) {
|
||||
assert_not_null(device);
|
||||
absolute_path_ = xe::utf8::join_guest_paths(device->mount_path(), path);
|
||||
name_ = xe::utf8::find_name_from_guest_path(path);
|
||||
}
|
||||
|
||||
Entry::~Entry() = default;
|
||||
|
||||
Reference in New Issue
Block a user