diff options
author | bunnei <bunneidev@gmail.com> | 2016-03-01 23:16:05 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2016-03-01 23:16:05 +0100 |
commit | cddb9bd2aac86482f177c115d92d6aaf71d83f04 (patch) | |
tree | 66cd6ce63998f60d10931801dafcd668949bc8e8 /src/core | |
parent | Merge pull request #1433 from yuriks/config-000A0000 (diff) | |
parent | DiskDirectory: Initialize the directory member with valid info. (diff) | |
download | yuzu-cddb9bd2aac86482f177c115d92d6aaf71d83f04.tar yuzu-cddb9bd2aac86482f177c115d92d6aaf71d83f04.tar.gz yuzu-cddb9bd2aac86482f177c115d92d6aaf71d83f04.tar.bz2 yuzu-cddb9bd2aac86482f177c115d92d6aaf71d83f04.tar.lz yuzu-cddb9bd2aac86482f177c115d92d6aaf71d83f04.tar.xz yuzu-cddb9bd2aac86482f177c115d92d6aaf71d83f04.tar.zst yuzu-cddb9bd2aac86482f177c115d92d6aaf71d83f04.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/file_sys/disk_archive.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/file_sys/disk_archive.cpp b/src/core/file_sys/disk_archive.cpp index 0ba502200..a51416774 100644 --- a/src/core/file_sys/disk_archive.cpp +++ b/src/core/file_sys/disk_archive.cpp @@ -139,7 +139,7 @@ bool DiskFile::Close() const { //////////////////////////////////////////////////////////////////////////////////////////////////// -DiskDirectory::DiskDirectory(const DiskArchive& archive, const Path& path) { +DiskDirectory::DiskDirectory(const DiskArchive& archive, const Path& path) : directory() { // TODO(Link Mauve): normalize path into an absolute path without "..", it can currently bypass // the root directory we set while opening the archive. // For example, opening /../../usr/bin can give the emulated program your installed programs. @@ -149,7 +149,9 @@ DiskDirectory::DiskDirectory(const DiskArchive& archive, const Path& path) { bool DiskDirectory::Open() { if (!FileUtil::IsDirectory(path)) return false; - FileUtil::ScanDirectoryTree(path, directory); + unsigned size = FileUtil::ScanDirectoryTree(path, directory); + directory.size = size; + directory.isDirectory = true; children_iterator = directory.children.begin(); return true; } |