summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/vfs_offset.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-07-28 00:14:03 +0200
committerZach Hilman <zachhilman@gmail.com>2018-07-28 00:14:03 +0200
commit906d785c73cb3644e8984fbfcbf5fcb8a1ebbc6f (patch)
treebeff5b868534a8bfb4eea7992553fa5fb5db5287 /src/core/file_sys/vfs_offset.cpp
parentMerge pull request #845 from lioncash/nfc (diff)
downloadyuzu-906d785c73cb3644e8984fbfcbf5fcb8a1ebbc6f.tar
yuzu-906d785c73cb3644e8984fbfcbf5fcb8a1ebbc6f.tar.gz
yuzu-906d785c73cb3644e8984fbfcbf5fcb8a1ebbc6f.tar.bz2
yuzu-906d785c73cb3644e8984fbfcbf5fcb8a1ebbc6f.tar.lz
yuzu-906d785c73cb3644e8984fbfcbf5fcb8a1ebbc6f.tar.xz
yuzu-906d785c73cb3644e8984fbfcbf5fcb8a1ebbc6f.tar.zst
yuzu-906d785c73cb3644e8984fbfcbf5fcb8a1ebbc6f.zip
Diffstat (limited to 'src/core/file_sys/vfs_offset.cpp')
-rw-r--r--src/core/file_sys/vfs_offset.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/file_sys/vfs_offset.cpp b/src/core/file_sys/vfs_offset.cpp
index a40331cef..847cde2f5 100644
--- a/src/core/file_sys/vfs_offset.cpp
+++ b/src/core/file_sys/vfs_offset.cpp
@@ -10,8 +10,9 @@
namespace FileSys {
OffsetVfsFile::OffsetVfsFile(std::shared_ptr<VfsFile> file_, size_t size_, size_t offset_,
- std::string name_)
- : file(std::move(file_)), offset(offset_), size(size_), name(std::move(name_)) {}
+ 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 OffsetVfsFile::GetName() const {
return name.empty() ? file->GetName() : name;
@@ -35,7 +36,7 @@ bool OffsetVfsFile::Resize(size_t new_size) {
}
std::shared_ptr<VfsDirectory> OffsetVfsFile::GetContainingDirectory() const {
- return file->GetContainingDirectory();
+ return parent;
}
bool OffsetVfsFile::IsWritable() const {