diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 0b4a99bbd7..cd20316bbe 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;