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;