From be0e37dc635bc23625070eff4d2df89882893743 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 26 Feb 2024 20:49:06 -0500 Subject: [PATCH] vfs_offset: don't record parent directory --- src/core/file_sys/vfs/vfs_offset.cpp | 7 +++---- src/core/file_sys/vfs/vfs_offset.h | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/core/file_sys/vfs/vfs_offset.cpp b/src/core/file_sys/vfs/vfs_offset.cpp index 1a37d26708..6b51ed3eb9 100644 --- a/src/core/file_sys/vfs/vfs_offset.cpp +++ b/src/core/file_sys/vfs/vfs_offset.cpp @@ -9,9 +9,8 @@ namespace FileSys { OffsetVfsFile::OffsetVfsFile(VirtualFile file_, std::size_t size_, std::size_t offset_, - std::string name_, VirtualDir parent_) - : file(file_), offset(offset_), size(size_), name(std::move(name_)), - parent(parent_ == nullptr ? file->GetContainingDirectory() : std::move(parent_)) {} + std::string name_) + : file(file_), offset(offset_), size(size_), name(std::move(name_)) {} OffsetVfsFile::~OffsetVfsFile() = default; @@ -37,7 +36,7 @@ bool OffsetVfsFile::Resize(std::size_t new_size) { } VirtualDir OffsetVfsFile::GetContainingDirectory() const { - return parent; + return nullptr; } bool OffsetVfsFile::IsWritable() const { diff --git a/src/core/file_sys/vfs/vfs_offset.h b/src/core/file_sys/vfs/vfs_offset.h index 4abe41d8e5..9800b4fd09 100644 --- a/src/core/file_sys/vfs/vfs_offset.h +++ b/src/core/file_sys/vfs/vfs_offset.h @@ -16,7 +16,7 @@ namespace FileSys { class OffsetVfsFile : public VfsFile { public: OffsetVfsFile(VirtualFile file, std::size_t size, std::size_t offset = 0, - std::string new_name = "", VirtualDir new_parent = nullptr); + std::string new_name = ""); ~OffsetVfsFile() override; std::string GetName() const override; @@ -44,7 +44,6 @@ private: std::size_t offset; std::size_t size; std::string name; - VirtualDir parent; }; } // namespace FileSys