Revert "[VFS] Fixed crash on filename extraction from path."

This reverts commit 02f5316562.

It's not needed anymore thanks to 6cba5ba7e6
This commit is contained in:
Gliniak
2024-11-02 19:44:28 +01:00
parent 35cc2ccd7a
commit d393725353
18 changed files with 29 additions and 44 deletions

View File

@@ -36,7 +36,7 @@ bool DiscZarchiveDevice::Initialize() {
const std::string root_path = std::string("/");
const ZArchiveNodeHandle handle = reader_->LookUp(root_path);
auto root_entry = new DiscZarchiveEntry(this, nullptr, root_path, "");
auto root_entry = new DiscZarchiveEntry(this, nullptr, root_path);
root_entry->attributes_ = kFileAttributeDirectory;
root_entry->handle_ = static_cast<uint32_t>(handle);
root_entry->name_ = root_path;
@@ -79,8 +79,7 @@ bool DiscZarchiveDevice::ReadAllEntries(const std::string& path,
}
if (reader_->IsFile(handle)) {
auto entry = new DiscZarchiveEntry(
this, parent, path, xe::utf8::find_name_from_guest_path(path));
auto entry = new DiscZarchiveEntry(this, parent, path);
entry->attributes_ = kFileAttributeReadOnly;
entry->handle_ = static_cast<uint32_t>(handle);
entry->parent_ = parent;
@@ -104,8 +103,7 @@ bool DiscZarchiveDevice::ReadAllEntries(const std::string& path,
return false;
}
auto entry =
new DiscZarchiveEntry(this, parent, full_path, dirEntry.name);
auto entry = new DiscZarchiveEntry(this, parent, full_path);
entry->handle_ = static_cast<uint32_t>(fileHandle);
entry->data_offset_ = 0;