From cc8380ee65612b0646ae2791ad4f79b5859aeac2 Mon Sep 17 00:00:00 2001 From: Markus Wick Date: Wed, 26 Aug 2015 22:12:23 +0200 Subject: [PATCH] Merge pull request #2914 from JosJuice/fix-volumedirectory Fix VolumeDirectory --- Source/Core/Common/FileUtil.cpp | 1 + Source/Core/Common/FileUtil.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 4709c011b2..bc44dd53bd 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -499,6 +499,7 @@ FSTEntry ScanDirectoryTree(const std::string &directory, bool recursive) entry = ScanDirectoryTree(physical_name, true); else entry.size = 0; + parent_entry.size += entry.size; } else { diff --git a/Source/Core/Common/FileUtil.h b/Source/Core/Common/FileUtil.h index 1337ee1670..ce8598a822 100644 --- a/Source/Core/Common/FileUtil.h +++ b/Source/Core/Common/FileUtil.h @@ -58,7 +58,7 @@ namespace File struct FSTEntry { bool isDirectory; - u64 size; // File length or number of entries from children + u64 size; // File length, or for directories, recursive count of children std::string physicalName; // Name on disk std::string virtualName; // Name in FST names table std::vector children;